subsurface/packaging/ios/iPhoneDeviceCMakeToolchain
Dirk Hohndel 320b4a77ef build-system/iOS: ensure cmake works for Qt builds
I stumbled across needing this when trying to build Kirigami via cmake (just
like on Android). I abandoned that attempt, but there seems to be no harm in
adding this.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00

21 lines
738 B
Text

INCLUDE(CMakeForceCompiler)
SET (CMAKE_CROSSCOMPILING TRUE)
SET (CMAKE_SYSTEM_NAME "Darwin")
SET (CMAKE_SYSTEM_PROCESSOR "arm")
SET (CMAKE_OSX_SYSROOT "$ENV{PLATFORM_DIR}")
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
SET (CMAKE_C_COMPILER $ENV{CC})
SET (CMAKE_CXX_COMPILER $ENV{CXX})
SET (CMAKE_FIND_ROOT_PATH "$ENV{SDK_DIR}" "$ENV{PLATFORM_DIR}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
MESSAGE (STATUS "PLATFORM_DIR = $ENV{PLATFORM_DIR}")
MESSAGE (STATUS "SDK_DIR = $ENV{SDK_DIR}")
MESSAGE (STATUS "CC = $ENV{CC}")
MESSAGE (STATUS "CXX = $ENV{CXX}")
MESSAGE (STATUS "LD = $ENV{LD}")