Skip to content

Commit

Permalink
updated macos settings in cmakelists
Browse files Browse the repository at this point in the history
  • Loading branch information
oulap committed Sep 27, 2024
1 parent d4df6a0 commit 224bdf6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,17 @@ message(STATUS "ITK_DIR=${ITK_DIR} pybind11_DIR=${pybind11_DIR}")
# --------------------------------------------------
# build settings
# --------------------------------------------------
# set -DAPPLE_ARM64=ON on cmake command line for arm64 build
# set -DAPPLE=ON and -DAPPLE_ARM64=ON on cmake command line for arm64 build
# when building with freesurfer, CMAKE_C_COMPILER and CMAKE_CXX_COMPILER will be specified on the cmake command line
if("${APPLE_ARM64} STREQUAL "ON")
set(CMAKE_OSX_ARCHITECTURES "arm64")
add_definitions(-DARM64 -DDarwin -DPNG_ARM_NEON_OPT=0)
else()
set(CMAKE_OSX_ARCHITECTURES "x86_64")
if(${APPLE})
if("${APPLE_ARM64} STREQUAL "ON")
set(CMAKE_OSX_ARCHITECTURES "arm64")
add_definitions(-DARM64 -DDarwin -DPNG_ARM_NEON_OPT=0)
else()
set(CMAKE_OSX_ARCHITECTURES "x86_64")
endif()
endif()
message(STATUS "CMAKE_C_COMPILER=${CMAKE_C_COMPILER}, CMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}, CMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}, CMAKE_CXX_COMPILER_ID=${CMAKE_CXX_COMPILER_ID}")
# warnings
Expand Down

0 comments on commit 224bdf6

Please sign in to comment.