summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-09-22 13:05:54 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-09-22 13:06:10 (GMT)
commitaf888a07f8e3ab7d6a736b5a5a129a1d808474e5 (patch)
treee258ee9b719865ed211bfbb829e0f87961f18272 /Modules
parentcc49d22e624963cbb42a4f06cbcff15f1ad2082f (diff)
parenta61c1d6ff4e9d4c2f9d673354aa8ec6a975aa4a5 (diff)
downloadCMake-af888a07f8e3ab7d6a736b5a5a129a1d808474e5.zip
CMake-af888a07f8e3ab7d6a736b5a5a129a1d808474e5.tar.gz
CMake-af888a07f8e3ab7d6a736b5a5a129a1d808474e5.tar.bz2
Merge topic 'macOS-simplify-framework-link-option'
a61c1d6ff4 macOS: Framework: simplify link flag Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !8824
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/Apple-Clang.cmake4
-rw-r--r--Modules/Platform/Apple-GNU.cmake3
2 files changed, 7 insertions, 0 deletions
diff --git a/Modules/Platform/Apple-Clang.cmake b/Modules/Platform/Apple-Clang.cmake
index 4d7546a..57b3910 100644
--- a/Modules/Platform/Apple-Clang.cmake
+++ b/Modules/Platform/Apple-Clang.cmake
@@ -14,6 +14,10 @@ macro(__apple_compiler_clang lang)
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.2)
set(CMAKE_${lang}_SYSTEM_FRAMEWORK_SEARCH_FLAG "-iframework ")
endif()
+
+ set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK "-framework <LIBRARY>")
+ set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE)
+
if(_CMAKE_OSX_SYSROOT_PATH MATCHES "/iPhoneOS")
set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-miphoneos-version-min=")
elseif(_CMAKE_OSX_SYSROOT_PATH MATCHES "/iPhoneSimulator")
diff --git a/Modules/Platform/Apple-GNU.cmake b/Modules/Platform/Apple-GNU.cmake
index 9572736..823c790 100644
--- a/Modules/Platform/Apple-GNU.cmake
+++ b/Modules/Platform/Apple-GNU.cmake
@@ -14,6 +14,9 @@ macro(__apple_compiler_gnu lang)
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.3)
set(CMAKE_${lang}_SYSTEM_FRAMEWORK_SEARCH_FLAG "-iframework ")
endif()
+
+ set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK "-framework <LIBRARY>")
+ set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE)
endmacro()
macro(cmake_gnu_set_sysroot_flag lang)