Compute SDKROOT and use it

This commit is contained in:
Raphael Coeffic
2021-09-16 12:05:41 +02:00
parent 28dc161337
commit a17a02c541
4 changed files with 16 additions and 4 deletions
+12
View File
@@ -84,6 +84,18 @@ if(WIN32)
list(APPEND CMAKE_PREFIX_PATH "${WIN_EXTRA_LIBS_PATH}" "${WIN_EXTRA_LIBS_PATH}/SDL") # hints for FindSDL
endif()
if(APPLE)
execute_process(COMMAND xcrun --show-sdk-path
OUTPUT_VARIABLE SDKROOT
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
message("-- SDKROOT: ${SDKROOT}")
set(CMAKE_OSX_SYSROOT ${SDKROOT})
set(SYSROOT_ARG -isysroot ${SDKROOT})
endif()
# Python check
find_package(PythonInterp 3 REQUIRED)
if(PYTHONINTERP_FOUND)