Let CMake autodetect Apple arch on M1 processor
This commit is contained in:
parent
e53d9e88a9
commit
d0ebdc8607
@ -25,11 +25,6 @@ if (NOT CMAKE_VERSION VERSION_LESS 3.9)
|
|||||||
cmake_policy(SET CMP0068 NEW)
|
cmake_policy(SET CMP0068 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# add some default value for some additional macOS variable
|
|
||||||
# note that those variables are ignored on other systems
|
|
||||||
if(NOT CMAKE_OSX_ARCHITECTURES)
|
|
||||||
set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "macOS architecture to build; 64-bit is expected" FORCE)
|
|
||||||
endif()
|
|
||||||
if(NOT CMAKE_OSX_SYSROOT)
|
if(NOT CMAKE_OSX_SYSROOT)
|
||||||
# query the path to the default SDK, will fail on non-macOS, but it's okay.
|
# query the path to the default SDK, will fail on non-macOS, but it's okay.
|
||||||
execute_process(COMMAND xcodebuild -sdk macosx -version Path
|
execute_process(COMMAND xcodebuild -sdk macosx -version Path
|
||||||
|
Loading…
Reference in New Issue
Block a user