summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Darwin.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-07-09 14:09:46 (GMT)
committerBrad King <brad.king@kitware.com>2008-07-09 14:09:46 (GMT)
commit0d54001276a3123e35e20ee7240cdeffe401e7af (patch)
tree828cabfa28cb3dd6e02812502b1615a5d54fbf8b /Modules/Platform/Darwin.cmake
parentda4f142cc12cf603f7d34562d558c0ed7bd65d5f (diff)
downloadCMake-0d54001276a3123e35e20ee7240cdeffe401e7af.zip
CMake-0d54001276a3123e35e20ee7240cdeffe401e7af.tar.gz
CMake-0d54001276a3123e35e20ee7240cdeffe401e7af.tar.bz2
ENH: Set version info for shared libs on OSX.
- Map SOVERSION major.minor.patch to compatibility_version - Map VERSION major.minor.patch to current_version - See issue #4383.
Diffstat (limited to 'Modules/Platform/Darwin.cmake')
-rw-r--r--Modules/Platform/Darwin.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index ecc465c..f0bdd8b 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -27,6 +27,11 @@ SET(CMAKE_SHARED_MODULE_SUFFIX ".so")
SET(CMAKE_MODULE_EXISTS 1)
SET(CMAKE_DL_LIBS "")
+SET(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG -Wl,-dylib_compatibility_version,)
+SET(CMAKE_C_OSX_CURRENT_VERSION_FLAG -Wl,-dylib_current_version,)
+SET(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
+SET(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
+
SET(CMAKE_C_LINK_FLAGS "-headerpad_max_install_names")
SET(CMAKE_CXX_LINK_FLAGS "-headerpad_max_install_names")