diff options
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Apple-AppleClang-OBJC.cmake | 6 | ||||
-rw-r--r-- | Modules/Platform/Apple-Clang-OBJC.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/Apple-GNU-OBJC.cmake | 4 | ||||
-rw-r--r-- | Modules/Platform/Darwin.cmake | 7 |
4 files changed, 18 insertions, 1 deletions
diff --git a/Modules/Platform/Apple-AppleClang-OBJC.cmake b/Modules/Platform/Apple-AppleClang-OBJC.cmake new file mode 100644 index 0000000..b78edb1 --- /dev/null +++ b/Modules/Platform/Apple-AppleClang-OBJC.cmake @@ -0,0 +1,6 @@ +include(Platform/Apple-Clang-OBJC) +if(NOT CMAKE_OBJC_COMPILER_VERSION VERSION_LESS 4.2) + set(CMAKE_OBJC_SYSTEM_FRAMEWORK_SEARCH_FLAG "-iframework ") +else() + unset(CMAKE_OBJC_SYSTEM_FRAMEWORK_SEARCH_FLAG) +endif() diff --git a/Modules/Platform/Apple-Clang-OBJC.cmake b/Modules/Platform/Apple-Clang-OBJC.cmake new file mode 100644 index 0000000..63cd846 --- /dev/null +++ b/Modules/Platform/Apple-Clang-OBJC.cmake @@ -0,0 +1,2 @@ +include(Platform/Apple-Clang) +__apple_compiler_clang(OBJC) diff --git a/Modules/Platform/Apple-GNU-OBJC.cmake b/Modules/Platform/Apple-GNU-OBJC.cmake new file mode 100644 index 0000000..aa8b33f --- /dev/null +++ b/Modules/Platform/Apple-GNU-OBJC.cmake @@ -0,0 +1,4 @@ +include(Platform/Apple-GNU) +__apple_compiler_gnu(OBJC) +cmake_gnu_set_sysroot_flag(OBJC) +cmake_gnu_set_osx_deployment_target_flag(OBJC) diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index 7e02814..dcda7c5 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -119,10 +119,15 @@ set(CMAKE_C_CREATE_MACOSX_FRAMEWORK set(CMAKE_CXX_CREATE_MACOSX_FRAMEWORK "<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>") +set(CMAKE_OBJC_CREATE_MACOSX_FRAMEWORK + "<CMAKE_OBJC_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_OBJC_FLAGS> <LINK_FLAGS> -o <TARGET> -dynamiclib -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>" +) + # Set default framework search path flag for languages known to use a # preprocessor that may find headers in frameworks. set(CMAKE_C_FRAMEWORK_SEARCH_FLAG -F) set(CMAKE_CXX_FRAMEWORK_SEARCH_FLAG -F) +set(CMAKE_OBJC_FRAMEWORK_SEARCH_FLAG -F) set(CMAKE_Fortran_FRAMEWORK_SEARCH_FLAG -F) # default to searching for frameworks first @@ -222,7 +227,7 @@ unset(_apps_paths) include(Platform/UnixPaths) if(_CMAKE_OSX_SYSROOT_PATH AND EXISTS ${_CMAKE_OSX_SYSROOT_PATH}/usr/include) list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${_CMAKE_OSX_SYSROOT_PATH}/usr) - foreach(lang C CXX) + foreach(lang C CXX OBJC) list(APPEND _CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES_INIT ${_CMAKE_OSX_SYSROOT_PATH}/usr/include) endforeach() endif() |