From: Christoph J. Thompson Date: Sun, 11 Mar 2012 09:19:06 +0000 (+0100) Subject: Include version symbols for cmake builds. X-Git-Tag: v1.2.7~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1e84b258c462a88ea0398b45515781f0c583ecb;p=thirdparty%2Fzlib-ng.git Include version symbols for cmake builds. Add a version variable so it gets added to the pkg-config file. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 39d210456..2ee2dbcb5 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")