From 43beef36ff1521756bc41378cfa251c843375f49 Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Fri, 12 Dec 2014 18:57:40 +0100 Subject: [PATCH] rdtk/shadow: install libraries versioned --- rdtk/CMakeLists.txt | 5 +++-- rdtk/librdtk/CMakeLists.txt | 4 ++++ server/shadow/CMakeLists.txt | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/rdtk/CMakeLists.txt b/rdtk/CMakeLists.txt index 063f19576..73c64facd 100644 --- a/rdtk/CMakeLists.txt +++ b/rdtk/CMakeLists.txt @@ -44,8 +44,9 @@ include(CMakePackageConfigHelpers) set(RDTK_VERSION_MAJOR "1") set(RDTK_VERSION_MINOR "1") set(RDTK_VERSION_REVISION "0") -set(RDTK_VERSION "${RDTK_VERSION_MAJOR}.${RDTK_VERSION_MINOR}") -set(RDTK_VERSION_FULL "${RDTK_VERSION}.${RDTK_VERSION_REVISION}") +set(RDTK_API_VERSION "${RDTK_VERSION_MAJOR}.${RDTK_VERSION_MINOR}") +set(RDTK_VERSION "${RDTK_API_VERSION}.${RDTK_VERSION_REVISION}") +set(RDTK_VERSION_FULL "${RDTK_VERSION}") set(RDTK_VERSION_FULL ${RDTK_VERSION_FULL} PARENT_SCOPE) # Default to release build type diff --git a/rdtk/librdtk/CMakeLists.txt b/rdtk/librdtk/CMakeLists.txt index 8a81964bd..950cc7d4b 100644 --- a/rdtk/librdtk/CMakeLists.txt +++ b/rdtk/librdtk/CMakeLists.txt @@ -58,6 +58,10 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) list(APPEND ${MODULE_PREFIX}_LIBS winpr) list(APPEND ${MODULE_PREFIX}_LIBS freerdp) +if (WITH_LIBRARY_VERSIONING) + set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${RDTK_VERSION} SOVERSION ${RDTK_API_VERSION}) +endif() + target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT RdTkTargets) diff --git a/server/shadow/CMakeLists.txt b/server/shadow/CMakeLists.txt index 78f85b03a..26a5c7b9a 100644 --- a/server/shadow/CMakeLists.txt +++ b/server/shadow/CMakeLists.txt @@ -238,6 +238,10 @@ list(APPEND ${MODULE_PREFIX}_LIBS rdtk) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +if (WITH_LIBRARY_VERSIONING) + set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) +endif() + install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT server) set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/shadow")