summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChristoph J. Thompson <cjsthompson@gmail.com>2012-03-11 10:19:06 +0100
committerMark Adler <madler@alumni.caltech.edu>2012-03-11 10:16:12 -0700
commitc1e84b258c462a88ea0398b45515781f0c583ecb (patch)
tree74e4ce037bde606f71edc3da8632bce3618b6879 /CMakeLists.txt
parentcd71ef302123032aed0accade96efaca3e1f33dd (diff)
downloadzlib-c1e84b258c462a88ea0398b45515781f0c583ecb.tar.gz
Include version symbols for cmake builds.
Add a version variable so it gets added to the pkg-config file.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 39d2104..2ee2dbc 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.7")
+
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")