[cmake-commits] king committed Darwin.cmake 1.42 1.43
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Jan 31 15:45:32 EST 2008
Update of /cvsroot/CMake/CMake/Modules/Platform
In directory public:/mounts/ram/cvs-serv30509/Modules/Platform
Modified Files:
Darwin.cmake
Log Message:
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
Index: Darwin.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Darwin.cmake,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- Darwin.cmake 16 Jan 2008 14:51:57 -0000 1.42
+++ Darwin.cmake 31 Jan 2008 20:45:30 -0000 1.43
@@ -103,6 +103,12 @@
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)
More information about the Cmake-commits
mailing list