diff options
author | Brad King <brad.king@kitware.com> | 2008-01-31 20:45:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-31 20:45:31 (GMT) |
commit | 2cff26fa52cf9043f00d1efaaf31ab93e2db22e8 (patch) | |
tree | 4d403a91a70594893fc6b303a9cf693d4e538a9d /Modules/Platform/Darwin.cmake | |
parent | 52e75800b4731692f1e311f0d8701875ac98c96d (diff) | |
download | CMake-2cff26fa52cf9043f00d1efaaf31ab93e2db22e8.zip CMake-2cff26fa52cf9043f00d1efaaf31ab93e2db22e8.tar.gz CMake-2cff26fa52cf9043f00d1efaaf31ab93e2db22e8.tar.bz2 |
ENH: Support linking to shared libs with dependent libs
- Split IMPORTED_LINK_LIBRARIES into two parts:
IMPORTED_LINK_INTERFACE_LIBRARIES
IMPORTED_LINK_DEPENDENT_LIBRARIES
- Add CMAKE_DEPENDENT_SHARED_LIBRARY_MODE to select behavior
- Set mode to LINK for Darwin (fixes universal binary problem)
- Update ExportImport test to account for changes
Diffstat (limited to 'Modules/Platform/Darwin.cmake')
-rw-r--r-- | Modules/Platform/Darwin.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index 4641269..5b497d6 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -103,6 +103,12 @@ 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_DEPENDENT_SHARED_LIBRARY_MODE "LINK") + SET(CMAKE_MacOSX_Content_COMPILE_OBJECT "\"${CMAKE_COMMAND}\" -E copy_if_different <SOURCE> <OBJECT>") SET(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w) |