diff options
author | David Cole <david.cole@kitware.com> | 2011-12-16 15:15:07 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-12-16 15:15:07 (GMT) |
commit | 65db5b4a993937aca84d600d3370eb584a51354a (patch) | |
tree | 3db453defff99ddd8ce357682a7625b0a53620f9 /Modules/Platform | |
parent | 2f82798ef88e8d03aa6457e57faebf4fc16d1660 (diff) | |
parent | 5d9934312d0b553eafb7c690487215cff7ddedb3 (diff) | |
download | CMake-65db5b4a993937aca84d600d3370eb584a51354a.zip CMake-65db5b4a993937aca84d600d3370eb584a51354a.tar.gz CMake-65db5b4a993937aca84d600d3370eb584a51354a.tar.bz2 |
Merge topic 'osx-dependent-libraries'
5d99343 Do not link private dependent shared libraries on OS X > 10.4
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Darwin.cmake | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index c11c8fb..867c788 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -187,11 +187,13 @@ IF(XCODE) SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX) ENDIF(XCODE) -# Need to list dependent shared libraries on link line. When building -# with -isysroot (for universal binaries), the linker always looks for -# dependent libraries under the sysroot. Listing them on the link -# line works around the problem. -SET(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 1) +IF("${_CURRENT_OSX_VERSION}" VERSION_LESS "10.5") + # Need to list dependent shared libraries on link line. When building + # with -isysroot (for universal binaries), the linker always looks for + # dependent libraries under the sysroot. Listing them on the link + # line works around the problem. + SET(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 1) +ENDIF() SET(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w) SET(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w) |