changeset 17:961d7f13759e

trying to replace <CONFIG> by ${CMAKE_BUILD_TYPE} for macOS
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 12 Sep 2023 07:11:50 +0200
parents 609ba59d1c54
children 78db385dddf1
files Resources/CMake/LibVtkConfiguration.cmake
diffstat 1 files changed, 3 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CMake/LibVtkConfiguration.cmake	Mon Sep 11 22:26:29 2023 +0200
+++ b/Resources/CMake/LibVtkConfiguration.cmake	Tue Sep 12 07:11:50 2023 +0200
@@ -71,7 +71,7 @@
       -DCMAKE_C_COMPILER=gcc
 
       BUILD_COMMAND
-      ${CMAKE_COMMAND} --build <BINARY_DIR> --config <CONFIG> --parallel ${NumberOfPhysicalCores} -t
+      ${CMAKE_COMMAND} --build <BINARY_DIR> --config ${CMAKE_BUILD_TYPE} --parallel ${NumberOfPhysicalCores} -t
       VTKCompileToolsConfig.cmake
 
       INSTALL_COMMAND ""  # Skip the install step
@@ -149,7 +149,7 @@
     -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
 
     BUILD_COMMAND
-    ${CMAKE_COMMAND} --build <BINARY_DIR> --config <CONFIG> --parallel ${NumberOfPhysicalCores} -t
+    ${CMAKE_COMMAND} --build <BINARY_DIR> --config ${CMAKE_BUILD_TYPE} --parallel ${NumberOfPhysicalCores} -t
     vtkCommonCore
     vtkCommonDataModel
     vtkCommonMath
@@ -196,12 +196,7 @@
   ExternalProject_Get_Property(VTK binary_dir)
   ExternalProject_Get_Property(VTK source_dir)
 
-  if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
-    # TODO - This looks very strange
-    link_directories(${binary_dir}/../Debug)
-  else()
-    link_directories(${binary_dir}/lib)
-  endif()
+  link_directories(${binary_dir}/lib)
 
   foreach(dir IN ITEMS
       Common/Core