summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-02 11:57:00 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-06-02 11:57:07 (GMT)
commita0c4c27443afe1c423c08063e2eaf96ffa2f54fb (patch)
tree7d5aa321d1826aa2ef6e77315c5e8b79e71753ba /Modules
parent855a7158ed5455f91892d408c4cdbf49e1b232cc (diff)
parent444dbd40def8a6d991879f9ed9499f13bc7ffb12 (diff)
downloadCMake-a0c4c27443afe1c423c08063e2eaf96ffa2f54fb.zip
CMake-a0c4c27443afe1c423c08063e2eaf96ffa2f54fb.tar.gz
CMake-a0c4c27443afe1c423c08063e2eaf96ffa2f54fb.tar.bz2
Merge topic 'macos-sdk-libraries'
444dbd40de Darwin: honour `CMAKE_OSX_SYSROOT` more faithfully Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4779
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/Darwin.cmake26
1 files changed, 21 insertions, 5 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index 0a4d4e1..c6de3b0 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -42,6 +42,7 @@ endif()
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
+set(CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES ".tbd" ".so")
set(CMAKE_SHARED_MODULE_PREFIX "lib")
set(CMAKE_SHARED_MODULE_SUFFIX ".so")
set(CMAKE_MODULE_EXISTS 1)
@@ -156,6 +157,13 @@ if(_CMAKE_OSX_SYSROOT_PATH)
break()
endif()
endforeach()
+
+ if(EXISTS ${_CMAKE_OSX_SYSROOT_PATH}/usr/lib)
+ list(INSERT CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES 0 ${_CMAKE_OSX_SYSROOT_PATH}/usr/lib)
+ endif()
+ if(EXISTS ${_CMAKE_OSX_SYSROOT_PATH}/usr/local/lib)
+ list(INSERT CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES 0 ${_CMAKE_OSX_SYSROOT_PATH}/usr/local/lib)
+ endif()
endif()
if (OSX_DEVELOPER_ROOT AND EXISTS "${OSX_DEVELOPER_ROOT}/Library/Frameworks")
list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
@@ -208,11 +216,19 @@ set(CMAKE_SYSTEM_APPBUNDLE_PATH
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 OBJC OBJCXX Swift)
- list(APPEND _CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES_INIT ${_CMAKE_OSX_SYSROOT_PATH}/usr/include)
- endforeach()
+if(_CMAKE_OSX_SYSROOT_PATH)
+ if(EXISTS ${_CMAKE_OSX_SYSROOT_PATH}/usr/include)
+ list(INSERT CMAKE_SYSTEM_PREFIX_PATH 0 ${_CMAKE_OSX_SYSROOT_PATH}/usr)
+ foreach(lang C CXX OBJC OBJCXX Swift)
+ list(APPEND _CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES_INIT ${_CMAKE_OSX_SYSROOT_PATH}/usr/include)
+ endforeach()
+ endif()
+ if(EXISTS ${_CMAKE_OSX_SYSROOT_PATH}/usr/local/include)
+ list(INSERT CMAKE_SYSTEM_PREFIX_PATH 0 ${_CMAKE_OSX_SYSROOT_PATH}/usr/local)
+ foreach(lang C CXX OBJC OBJCXX Swift)
+ list(APPEND _CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES_INIT ${_CMAKE_OSX_SYSROOT_PATH}/usr/local/include)
+ endforeach()
+ endif()
endif()
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
/sw # Fink