diff options
author | Brad King <brad.king@kitware.com> | 2008-01-31 15:45:31 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-31 15:45:31 -0500 |
commit | 2cff26fa52cf9043f00d1efaaf31ab93e2db22e8 (patch) | |
tree | 4d403a91a70594893fc6b303a9cf693d4e538a9d /Modules/Platform | |
parent | 52e75800b4731692f1e311f0d8701875ac98c96d (diff) | |
download | cmake-2cff26fa52cf9043f00d1efaaf31ab93e2db22e8.tar.gz |
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')
-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 46412697b7..5b497d6956 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) |