summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Darwin-xlc.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-03-01 17:26:25 (GMT)
committerBrad King <brad.king@kitware.com>2005-03-01 17:26:25 (GMT)
commit54c99dc5fdfb845a3ae5076f5daa812adda36ad1 (patch)
tree7b5f688735a163bbf0f39fabe02530b93dbfd5b9 /Modules/Platform/Darwin-xlc.cmake
parent2aa613b98c28daa5ed71f7b1798976197b467a76 (diff)
downloadCMake-54c99dc5fdfb845a3ae5076f5daa812adda36ad1.zip
CMake-54c99dc5fdfb845a3ae5076f5daa812adda36ad1.tar.gz
CMake-54c99dc5fdfb845a3ae5076f5daa812adda36ad1.tar.bz2
ENH: Adding support for shared library versioning using the -install_name option on the OSX linker. This is actually needed to support relative -o paths which are used by cmLocalUnixMakefileGenerator2.
Diffstat (limited to 'Modules/Platform/Darwin-xlc.cmake')
-rw-r--r--Modules/Platform/Darwin-xlc.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/Platform/Darwin-xlc.cmake b/Modules/Platform/Darwin-xlc.cmake
index 8b4f9ff..ebe099b 100644
--- a/Modules/Platform/Darwin-xlc.cmake
+++ b/Modules/Platform/Darwin-xlc.cmake
@@ -1,2 +1,8 @@
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-qmkshrobj")
SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle")
+
+IF(CMAKE_GENERATOR_NEW)
+ # Enable shared library versioning.
+ SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-install_name")
+ SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-install_name")
+ENDIF(CMAKE_GENERATOR_NEW)