[Zlib-devel] [PATCH 4/4] CMake build should also include version symbols. Add a version variable so it gets added to the pkg-config file.
Christoph J. Thompson
cjsthompson at gmail.com
Sun Mar 11 05:19:06 EDT 2012
CMake build should also include version symbols. Add a version variable
so it gets added to the pkg-config file.
modified: CMakeLists.txt
---
CMakeLists.txt | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 39d2104..9b2c50b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,8 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
project(zlib C)
+set(VERSION "1.2.6")
+
set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers")
@@ -162,6 +164,7 @@ endif()
if(UNIX)
# On unix-like platforms the library is almost always called libz
set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
+ set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,zlib.map")
elseif(BUILD_SHARED_LIBS AND WIN32)
# Creates zlib1.dll when building shared library version
set_target_properties(zlib PROPERTIES SUFFIX "1.dll")
--
1.7.4.4
--
More information about the Zlib-devel
mailing list