5151#
5252# INFORMATION / HELP
5353#
54- # The following options control the behaviour of this toolchain:
54+ ###############################################################################
55+ # OPTIONS #
56+ ###############################################################################
5557#
5658# PLATFORM: (default "OS64")
5759# OS = Build for iPhoneOS.
8486#
8587# DEPLOYMENT_TARGET: Minimum SDK version to target. Default 2.0 on watchOS and 9.0 on tvOS+iOS
8688#
87- # ENABLE_BITCODE: (1|0) Enables or disables bitcode support. Default 1 (true)
89+ # NAMED_LANGUAGE_SUPPORT:
90+ # ON (default) = Will require "enable_language(OBJC) and/or enable_language(OBJCXX)" for full OBJC|OBJCXX support
91+ # OFF = Will embed the OBJC and OBJCXX flags into the CMAKE_C_FLAGS and CMAKE_CXX_FLAGS (legacy behaviour, CMake version < 3.16)
92+ #
93+ # ENABLE_BITCODE: (ON|OFF) Enables or disables bitcode support. Default ON
8894#
89- # ENABLE_ARC: (1|0 ) Enables or disables ARC support. Default 1 (true, ARC enabled by default)
95+ # ENABLE_ARC: (ON|OFF ) Enables or disables ARC support. Default ON ( ARC enabled by default)
9096#
91- # ENABLE_VISIBILITY: (1|0 ) Enables or disables symbol visibility support. Default 0 (false, visibility hidden by default)
97+ # ENABLE_VISIBILITY: (ON|OFF ) Enables or disables symbol visibility support. Default OFF ( visibility hidden by default)
9298#
93- # ENABLE_STRICT_TRY_COMPILE: (1|0 ) Enables or disables strict try_compile() on all Check* directives (will run linker
94- # to actually check if linking is possible). Default 0 (false, will set CMAKE_TRY_COMPILE_TARGET_TYPE to STATIC_LIBRARY)
99+ # ENABLE_STRICT_TRY_COMPILE: (ON|OFF ) Enables or disables strict try_compile() on all Check* directives (will run linker
100+ # to actually check if linking is possible). Default OFF ( will set CMAKE_TRY_COMPILE_TARGET_TYPE to STATIC_LIBRARY)
95101#
96102# ARCHS: (armv7 armv7s armv7k arm64 arm64_32 i386 x86_64) If specified, will override the default architectures for the given PLATFORM
97103# OS = armv7 armv7s arm64 (if applicable)
108114# MAC_CATALYST = x86_64
109115# MAC_CATALYST_ARM64 = arm64
110116#
117+ # NOTE: When manually specifying ARCHS, put a semi-colon between the entries. E.g., -DARCHS="armv7;arm64"
118+ #
119+ ###############################################################################
120+ # END OPTIONS #
121+ ###############################################################################
122+ #
111123# This toolchain defines the following properties (available via get_property()) for use externally:
112124#
113125# PLATFORM: The currently targeted platform.
@@ -137,16 +149,6 @@ if(DEFINED ENV{_IOS_TOOLCHAIN_HAS_RUN})
137149endif ()
138150set (ENV{_IOS_TOOLCHAIN_HAS_RUN} true )
139151
140- ###############################################################################
141- # OPTIONS #
142- ###############################################################################
143-
144- option (DROP_32_BIT "Drops the 32-bit targets universally." YES )
145-
146- ###############################################################################
147- # END OPTIONS #
148- ###############################################################################
149-
150152# List of supported platform values
151153list (APPEND _supported_platforms
152154 "OS" "OS64" "OS64COMBINED" "SIMULATOR" "SIMULATOR64" "SIMULATORARM64"
@@ -232,6 +234,19 @@ set(CMAKE_HAVE_THREADS_LIBRARY 1)
232234set (CMAKE_USE_WIN32_THREADS_INIT 0)
233235set (CMAKE_USE_PTHREADS_INIT 1)
234236
237+ # Specify named language support defaults.
238+ if (NOT DEFINED NAMED_LANGUAGE_SUPPORT AND ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16" )
239+ set (NAMED_LANGUAGE_SUPPORT ON )
240+ message (STATUS "[DEFAULTS] Using explicit named language support! E.g., enable_language(CXX) is needed in the project files." )
241+ elseif (NOT DEFINED NAMED_LANGUAGE_SUPPORT AND ${CMAKE_VERSION} VERSION_LESS "3.16" )
242+ set (NAMED_LANGUAGE_SUPPORT OFF )
243+ message (STATUS "[DEFAULTS] Disabling explicit named language support. Falling back to legacy behaviour." )
244+ elseif (DEFINED NAMED_LANGUAGE_SUPPORT AND ${CMAKE_VERSION} VERSION_LESS "3.16" )
245+ message (FATAL_ERROR "CMake named language support for OBJC and OBJCXX was added in CMake 3.16." )
246+ endif ()
247+ set (NAMED_LANGUAGE_SUPPORT_INT ${NAMED_LANGUAGE_SUPPORT} CACHE BOOL
248+ "Whether or not to enable explicit named language support" FORCE)
249+
235250# Specify minimum version of deployment target.
236251if (NOT DEFINED DEPLOYMENT_TARGET)
237252 if (PLATFORM MATCHES "WATCHOS" )
@@ -287,7 +302,7 @@ elseif(PLATFORM_INT STREQUAL "OS64")
287302 set (SDK_NAME iphoneos)
288303 if (NOT ARCHS)
289304 if (XCODE_VERSION_INT VERSION_GREATER 10.0)
290- set (ARCHS arm64) # Add arm64e when Apple have fixed the integration issues with it, libarclite_iphoneos.a is currently missung bitcode markers for example
305+ set (ARCHS arm64) # FIXME: Add arm64e when Apple have fixed the integration issues with it, libarclite_iphoneos.a is currently missung bitcode markers for example
291306 else ()
292307 set (ARCHS arm64)
293308 endif ()
@@ -300,7 +315,7 @@ elseif(PLATFORM_INT STREQUAL "OS64COMBINED")
300315 if (MODERN_CMAKE)
301316 if (NOT ARCHS)
302317 if (XCODE_VERSION_INT VERSION_GREATER 10.0)
303- set (ARCHS arm64 x86_64) # Add arm64e when Apple have fixed the integration issues with it, libarclite_iphoneos.a is currently missung bitcode markers for example
318+ set (ARCHS arm64 x86_64) # FIXME: Add arm64e when Apple have fixed the integration issues with it, libarclite_iphoneos.a is currently missung bitcode markers for example
304319 set (CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] "arm64" )
305320 set (CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "x86_64" )
306321 set (CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] "arm64" )
@@ -448,6 +463,8 @@ else()
448463 message (FATAL_ERROR "Invalid PLATFORM: ${PLATFORM_INT} " )
449464endif ()
450465
466+ string (REPLACE ";" " " ARCHS_SPACED "${ARCHS} " )
467+
451468if (MODERN_CMAKE AND PLATFORM_INT MATCHES ".*COMBINED" AND NOT CMAKE_GENERATOR MATCHES "Xcode" )
452469 message (FATAL_ERROR "The COMBINED options only work with Xcode generator, -G Xcode" )
453470endif ()
@@ -462,10 +479,11 @@ if(CMAKE_GENERATOR MATCHES "Xcode" AND PLATFORM_INT MATCHES "^MAC_CATALYST")
462479 set (CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "${MACOSX_DEPLOYMENT_TARGET} " )
463480 endif ()
464481elseif (CMAKE_GENERATOR MATCHES "Xcode" )
482+ set (CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++" )
465483 set (CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "${DEPLOYMENT_TARGET} " )
466484 if (NOT PLATFORM_INT MATCHES ".*COMBINED" )
467- set (CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=${SDK_NAME} *] "${ARCHS } " )
468- set (CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=${SDK_NAME} *] "${ARCHS } " )
485+ set (CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=${SDK_NAME} *] "${ARCHS_SPACED } " )
486+ set (CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=${SDK_NAME} *] "${ARCHS_SPACED } " )
469487 endif ()
470488endif ()
471489
@@ -499,31 +517,31 @@ endif()
499517if (NOT DEFINED ENABLE_BITCODE AND NOT ARCHS MATCHES "((^|;|, )(i386|x86_64))+" )
500518 # Unless specified, enable bitcode support by default
501519 message (STATUS "[DEFAULTS] Enabling bitcode support by default. ENABLE_BITCODE not provided!" )
502- set (ENABLE_BITCODE TRUE )
520+ set (ENABLE_BITCODE ON )
503521elseif (NOT DEFINED ENABLE_BITCODE)
504522 message (STATUS "[DEFAULTS] Disabling bitcode support by default on simulators. ENABLE_BITCODE not provided for override!" )
505- set (ENABLE_BITCODE FALSE )
523+ set (ENABLE_BITCODE OFF )
506524endif ()
507525set (ENABLE_BITCODE_INT ${ENABLE_BITCODE} CACHE BOOL
508526 "Whether or not to enable bitcode" FORCE)
509527# Use ARC or not
510528if (NOT DEFINED ENABLE_ARC)
511529 # Unless specified, enable ARC support by default
512- set (ENABLE_ARC TRUE )
530+ set (ENABLE_ARC ON )
513531 message (STATUS "[DEFAULTS] Enabling ARC support by default. ENABLE_ARC not provided!" )
514532endif ()
515533set (ENABLE_ARC_INT ${ENABLE_ARC} CACHE BOOL "Whether or not to enable ARC" FORCE)
516534# Use hidden visibility or not
517535if (NOT DEFINED ENABLE_VISIBILITY)
518536 # Unless specified, disable symbols visibility by default
519- set (ENABLE_VISIBILITY FALSE )
537+ set (ENABLE_VISIBILITY OFF )
520538 message (STATUS "[DEFAULTS] Hiding symbols visibility by default. ENABLE_VISIBILITY not provided!" )
521539endif ()
522540set (ENABLE_VISIBILITY_INT ${ENABLE_VISIBILITY} CACHE BOOL "Whether or not to hide symbols from the dynamic linker (-fvisibility=hidden)" FORCE)
523541# Set strict compiler checks or not
524542if (NOT DEFINED ENABLE_STRICT_TRY_COMPILE)
525543 # Unless specified, disable strict try_compile()
526- set (ENABLE_STRICT_TRY_COMPILE FALSE )
544+ set (ENABLE_STRICT_TRY_COMPILE OFF )
527545 message (STATUS "[DEFAULTS] Using NON-strict compiler checks by default. ENABLE_STRICT_TRY_COMPILE not provided!" )
528546endif ()
529547set (ENABLE_STRICT_TRY_COMPILE_INT ${ENABLE_STRICT_TRY_COMPILE} CACHE BOOL
@@ -628,7 +646,6 @@ if(MODERN_CMAKE)
628646 if (PLATFORM_INT MATCHES ".*COMBINED" )
629647 set (CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "NO" )
630648 set (CMAKE_IOS_INSTALL_COMBINED YES )
631- message (STATUS "Will combine built (static) artifacts into FAT lib..." )
632649 endif ()
633650elseif (NOT DEFINED CMAKE_SYSTEM_NAME AND ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.10" )
634651 # Legacy code path prior to CMake 3.14 or fallback if no CMAKE_SYSTEM_NAME specified
@@ -639,16 +656,16 @@ elseif(NOT DEFINED CMAKE_SYSTEM_NAME)
639656endif ()
640657# Standard settings.
641658set (CMAKE_SYSTEM_VERSION ${SDK_VERSION} CACHE INTERNAL "" )
642- set (UNIX TRUE CACHE BOOL "" )
643- set (APPLE TRUE CACHE BOOL "" )
659+ set (UNIX ON CACHE BOOL "" )
660+ set (APPLE ON CACHE BOOL "" )
644661if (PLATFORM STREQUAL "MAC" OR PLATFORM STREQUAL "MAC_ARM64" )
645- set (IOS FALSE CACHE BOOL "" )
646- set (MACOS TRUE CACHE BOOL "" )
662+ set (IOS OFF CACHE BOOL "" )
663+ set (MACOS ON CACHE BOOL "" )
647664elseif (PLATFORM STREQUAL "MAC_CATALYST" OR PLATFORM STREQUAL "MAC_CATALYST_ARM64" )
648- set (IOS TRUE CACHE BOOL "" )
649- set (MACOS TRUE CACHE BOOL "" )
665+ set (IOS ON CACHE BOOL "" )
666+ set (MACOS ON CACHE BOOL "" )
650667else ()
651- set (IOS TRUE CACHE BOOL "" )
668+ set (IOS ON CACHE BOOL "" )
652669endif ()
653670set (CMAKE_AR ar CACHE FILEPATH "" FORCE)
654671set (CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE)
@@ -757,6 +774,14 @@ else()
757774 set (CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC "NO" )
758775endif ()
759776
777+ if (NAMED_LANGUAGE_SUPPORT_INT)
778+ set (OBJC_VARS "-fobjc-abi-version=2 -DOBJC_OLD_DISPATCH_PROTOTYPES=0" )
779+ set (OBJC_LEGACY_VARS "" )
780+ else ()
781+ set (OBJC_VARS "" )
782+ set (OBJC_LEGACY_VARS "-fobjc-abi-version=2 -DOBJC_OLD_DISPATCH_PROTOTYPES=0" )
783+ endif ()
784+
760785if (NOT ENABLE_VISIBILITY_INT)
761786 foreach (lang ${languages} )
762787 set (CMAKE_${lang} _VISIBILITY_PRESET "hidden" CACHE INTERNAL "" )
@@ -777,17 +802,36 @@ endif()
777802
778803#Check if Xcode generator is used, since that will handle these flags automagically
779804if (CMAKE_GENERATOR MATCHES "Xcode" )
780- message (STATUS "Not setting any manual command-line buildflags, since Xcode is selected as generator." )
805+ message (STATUS "Not setting any manual command-line buildflags, since Xcode is selected as generator. Modifying the Xcode build-settings directly instead. " )
781806else ()
782- # Hidden visibility is required for C++ on iOS.
783- set (CMAKE_C_FLAGS "${C_TARGET_FLAGS} ${APPLE_TARGET_TRIPLE_FLAG} ${SDK_NAME_VERSION_FLAGS} ${BITCODE} -fobjc-abi-version=2 ${FOBJC_ARC} ${CMAKE_C_FLAGS} " )
784- set (CMAKE_CXX_FLAGS "${C_TARGET_FLAGS} ${APPLE_TARGET_TRIPLE_FLAG} ${SDK_NAME_VERSION_FLAGS} ${BITCODE} ${VISIBILITY} -fobjc-abi-version=2 ${FOBJC_ARC} ${CMAKE_CXX_FLAGS} " )
785- set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -O0 -g ${CMAKE_CXX_FLAGS_DEBUG} " )
786- set (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS} -DNDEBUG -Os -ffast-math ${CMAKE_CXX_FLAGS_MINSIZEREL} " )
787- set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} -DNDEBUG -O2 -g -ffast-math ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} " )
788- set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -DNDEBUG -O3 -ffast-math ${CMAKE_CXX_FLAGS_RELEASE} " )
807+ set (CMAKE_C_FLAGS "${C_TARGET_FLAGS} ${APPLE_TARGET_TRIPLE_FLAG} ${SDK_NAME_VERSION_FLAGS} ${OBJC_LEGACY_VARS} ${BITCODE} ${VISIBILITY} ${CMAKE_C_FLAGS} " )
808+ set (CMAKE_C_FLAGS_DEBUG "-O0 -g ${CMAKE_C_FLAGS_DEBUG} " )
809+ set (CMAKE_C_FLAGS_MINSIZEREL "-DNDEBUG -Os ${CMAKE_C_FLAGS_MINSIZEREL} " )
810+ set (CMAKE_C_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2 -g ${CMAKE_C_FLAGS_RELWITHDEBINFO} " )
811+ set (CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O3 ${CMAKE_C_FLAGS_RELEASE} " )
812+ set (CMAKE_CXX_FLAGS "${C_TARGET_FLAGS} ${APPLE_TARGET_TRIPLE_FLAG} ${SDK_NAME_VERSION_FLAGS} ${OBJC_LEGACY_VARS} ${BITCODE} ${VISIBILITY} ${CMAKE_CXX_FLAGS} " )
813+ set (CMAKE_CXX_FLAGS_DEBUG "-O0 -g ${CMAKE_CXX_FLAGS_DEBUG} " )
814+ set (CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG -Os ${CMAKE_CXX_FLAGS_MINSIZEREL} " )
815+ set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2 -g ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} " )
816+ set (CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3 ${CMAKE_CXX_FLAGS_RELEASE} " )
817+ if (NAMED_LANGUAGE_SUPPORT_INT)
818+ set (CMAKE_OBJC_FLAGS "${C_TARGET_FLAGS} ${APPLE_TARGET_TRIPLE_FLAG} ${SDK_NAME_VERSION_FLAGS} ${BITCODE} ${VISIBILITY} ${FOBJC_ARC} ${OBJC_VARS} ${CMAKE_OBJC_FLAGS} " )
819+ set (CMAKE_OBJC_FLAGS_DEBUG "-O0 -g ${CMAKE_OBJC_FLAGS_DEBUG} " )
820+ set (CMAKE_OBJC_FLAGS_MINSIZEREL "-DNDEBUG -Os ${CMAKE_OBJC_FLAGS_MINSIZEREL} " )
821+ set (CMAKE_OBJC_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2 -g ${CMAKE_OBJC_FLAGS_RELWITHDEBINFO} " )
822+ set (CMAKE_OBJC_FLAGS_RELEASE "-DNDEBUG -O3 ${CMAKE_OBJC_FLAGS_RELEASE} " )
823+ set (CMAKE_OBJCXX_FLAGS "${C_TARGET_FLAGS} ${APPLE_TARGET_TRIPLE_FLAG} ${SDK_NAME_VERSION_FLAGS} ${BITCODE} ${VISIBILITY} ${FOBJC_ARC} ${OBJC_VARS} ${CMAKE_OBJCXX_FLAGS} " )
824+ set (CMAKE_OBJCXX_FLAGS_DEBUG "-O0 -g ${CMAKE_OBJCXX_FLAGS_DEBUG} " )
825+ set (CMAKE_OBJCXX_FLAGS_MINSIZEREL "-DNDEBUG -Os ${CMAKE_OBJCXX_FLAGS_MINSIZEREL} " )
826+ set (CMAKE_OBJCXX_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2 -g ${CMAKE_OBJCXX_FLAGS_RELWITHDEBINFO} " )
827+ set (CMAKE_OBJCXX_FLAGS_RELEASE "-DNDEBUG -O3 ${CMAKE_OBJCXX_FLAGS_RELEASE} " )
828+ endif ()
789829 set (CMAKE_C_LINK_FLAGS "${C_TARGET_FLAGS} ${SDK_NAME_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS} " )
790830 set (CMAKE_CXX_LINK_FLAGS "${C_TARGET_FLAGS} ${SDK_NAME_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS} " )
831+ if (NAMED_LANGUAGE_SUPPORT_INT)
832+ set (CMAKE_OBJC_LINK_FLAGS "${C_TARGET_FLAGS} ${SDK_NAME_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_OBJC_LINK_FLAGS} " )
833+ set (CMAKE_OBJCXX_LINK_FLAGS "${C_TARGET_FLAGS} ${SDK_NAME_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_OBJCXX_LINK_FLAGS} " )
834+ endif ()
791835 set (CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -x assembler-with-cpp -arch ${CMAKE_OSX_ARCHITECTURES} ${APPLE_TARGET_TRIPLE_FLAG} " )
792836endif ()
793837
@@ -805,6 +849,9 @@ message(STATUS "Using minimum deployment version: ${DEPLOYMENT_TARGET}"
805849 " (SDK version: ${SDK_VERSION} )" )
806850if (MODERN_CMAKE)
807851 message (STATUS "Merging integrated CMake 3.14+ iOS,tvOS,watchOS,macOS toolchain(s) with this toolchain!" )
852+ if (PLATFORM_INT MATCHES ".*COMBINED" )
853+ message (STATUS "Will combine built (static) artifacts into FAT lib..." )
854+ endif ()
808855endif ()
809856if (CMAKE_GENERATOR MATCHES "Xcode" )
810857 message (STATUS "Using Xcode version: ${XCODE_VERSION_INT} " )
@@ -844,6 +891,7 @@ set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
844891 PLATFORM
845892 XCODE_VERSION_INT
846893 SDK_VERSION
894+ NAMED_LANGUAGE_SUPPORT
847895 DEPLOYMENT_TARGET
848896 CMAKE_DEVELOPER_ROOT
849897 CMAKE_OSX_SYSROOT_INT
@@ -857,6 +905,10 @@ set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
857905 BUILD_LIBTOOL
858906 CMAKE_INSTALL_NAME_TOOL
859907 CMAKE_C_FLAGS
908+ CMAKE_C_DEBUG
909+ CMAKE_C_MINSIZEREL
910+ CMAKE_C_RELWITHDEBINFO
911+ CMAKE_C_RELEASE
860912 CMAKE_CXX_FLAGS
861913 CMAKE_CXX_FLAGS_DEBUG
862914 CMAKE_CXX_FLAGS_MINSIZEREL
@@ -865,7 +917,24 @@ set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
865917 CMAKE_C_LINK_FLAGS
866918 CMAKE_CXX_LINK_FLAGS
867919 CMAKE_ASM_FLAGS
868- )
920+ )
921+
922+ if (NAMED_LANGUAGE_SUPPORT_INT)
923+ list (APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
924+ CMAKE_OBJC_FLAGS
925+ CMAKE_OBJC_DEBUG
926+ CMAKE_OBJC_MINSIZEREL
927+ CMAKE_OBJC_RELWITHDEBINFO
928+ CMAKE_OBJC_RELEASE
929+ CMAKE_OBJCXX_FLAGS
930+ CMAKE_OBJCXX_DEBUG
931+ CMAKE_OBJCXX_MINSIZEREL
932+ CMAKE_OBJCXX_RELWITHDEBINFO
933+ CMAKE_OBJCXX_RELEASE
934+ CMAKE_OBJC_LINK_FLAGS
935+ CMAKE_OBJCXX_LINK_FLAGS
936+ )
937+ endif ()
869938
870939set (CMAKE_PLATFORM_HAS_INSTALLNAME 1)
871940set (CMAKE_SHARED_LINKER_FLAGS "-rpath @executable_path/Frameworks -rpath @loader_path/Frameworks" )
@@ -935,7 +1004,7 @@ macro(find_host_package)
9351004 set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
9361005 set (CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER)
9371006 set (_TOOLCHAIN_IOS ${IOS} )
938- set (IOS FALSE )
1007+ set (IOS OFF )
9391008 find_package (${ARGN} )
9401009 set (IOS ${_TOOLCHAIN_IOS} )
9411010 set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
0 commit comments