ClickHouse/cmake/darwin/sdk.cmake
Ivan Lezhankin e692a88196 CMake now works
Example: -DCMAKE_SYSTEM_NAME=Darwin -DSDK_PATH=${HOME}/stuff/MacOSX10.12.sdk -DLINKER_NAME=${HOME}/.local/bin/ld64
2019-09-13 17:56:27 +03:00

12 lines
468 B
CMake

option (SDK_PATH "Path to the SDK to build with" "")
if (NOT EXISTS "${SDK_PATH}/SDKSettings.plist")
message (FATAL_ERROR "Wrong SDK path provided: ${SDK_PATH}")
endif ()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isysroot ${SDK_PATH}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isysroot ${SDK_PATH}")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -isysroot ${SDK_PATH}")
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -isysroot ${SDK_PATH}")