From 3232be51b08d92cb0935ab5ec0e9e41800091432 Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Wed, 13 Jan 2016 17:37:19 +0100 Subject: [PATCH] Use major version only for SOVERSION For 2.0+ major will be increased if ABI/API isn't compatible anymore. --- CMakeLists.txt | 4 ++-- rdtk/CMakeLists.txt | 4 ++-- winpr/CMakeLists.txt | 7 +++++-- winpr/libwinpr/CMakeLists.txt | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e2f908d7..7b7cd6bc0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,8 +72,8 @@ set(FREERDP_VERSION_MAJOR "2") set(FREERDP_VERSION_MINOR "0") set(FREERDP_VERSION_REVISION "0") set(FREERDP_VERSION_SUFFIX "dev") -set(FREERDP_API_VERSION "${FREERDP_VERSION_MAJOR}.${FREERDP_VERSION_MINOR}") -set(FREERDP_VERSION "${FREERDP_API_VERSION}.${FREERDP_VERSION_REVISION}") +set(FREERDP_API_VERSION "${FREERDP_VERSION_MAJOR}") +set(FREERDP_VERSION "${FREERDP_VERSION_MAJOR}.${FREERDP_VERSION_MINOR}.${FREERDP_VERSION_REVISION}") if (FREERDP_VERSION_SUFFIX) set(FREERDP_VERSION_FULL "${FREERDP_VERSION}-${FREERDP_VERSION_SUFFIX}") else() diff --git a/rdtk/CMakeLists.txt b/rdtk/CMakeLists.txt index 287f210a0..6faea306c 100644 --- a/rdtk/CMakeLists.txt +++ b/rdtk/CMakeLists.txt @@ -44,8 +44,8 @@ include(CMakePackageConfigHelpers) set(RDTK_VERSION_MAJOR "0") set(RDTK_VERSION_MINOR "0") set(RDTK_VERSION_REVISION "1") -set(RDTK_API_VERSION "${RDTK_VERSION_MAJOR}.${RDTK_VERSION_MINOR}") -set(RDTK_VERSION "${RDTK_API_VERSION}.${RDTK_VERSION_REVISION}") +set(RDTK_API_VERSION "${RDTK_VERSION_MAJOR}") +set(RDTK_VERSION "${RDTK_VERSION_MAJOR}.${RDTK_VERSION_MINOR}.${RDTK_VERSION_REVISION}") set(RDTK_VERSION_FULL "${RDTK_VERSION}") # Default to release build type diff --git a/winpr/CMakeLists.txt b/winpr/CMakeLists.txt index 96962f215..c071b3b26 100644 --- a/winpr/CMakeLists.txt +++ b/winpr/CMakeLists.txt @@ -53,10 +53,11 @@ set(WINPR_VERSION_MINOR "1") set(WINPR_VERSION_REVISION "0") set(WINPR_VERSION "${WINPR_VERSION_MAJOR}.${WINPR_VERSION_MINOR}.${WINPR_VERSION_REVISION}") set(WINPR_VERSION_FULL "${WINPR_VERSION}") +set(WINPR_API_VERSION "${WINPR_VERSION_MAJOR}") if(FREERDP_BUILD) set(WINPR_VERSION_FULL ${WINPR_VERSION_FULL} PARENT_SCOPE) - set(WINPR_VERSION_FULL ${WINPR_VERSION} PARENT_SCOPE) + set(WINPR_VERSION ${WINPR_VERSION} PARENT_SCOPE) else() set(CMAKE_THREAD_PREFER_PTHREAD TRUE) @@ -180,6 +181,8 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10") endif() -set(WINPR_PKG_CONFIG_FILENAME winpr${WINPR_VERSION_MAJOR} PARENT_SCOPE) +if(FREERDP_BUILD) + set(WINPR_PKG_CONFIG_FILENAME winpr${WINPR_VERSION_MAJOR} PARENT_SCOPE) +endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/winpr.pc.in ${CMAKE_CURRENT_BINARY_DIR}/winpr${WINPR_VERSION_MAJOR}.pc @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/winpr${WINPR_VERSION_MAJOR}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/winpr/libwinpr/CMakeLists.txt b/winpr/libwinpr/CMakeLists.txt index 65f9af0ec..3ea073ce9 100644 --- a/winpr/libwinpr/CMakeLists.txt +++ b/winpr/libwinpr/CMakeLists.txt @@ -114,7 +114,7 @@ endif() add_library(${MODULE_NAME} ${WINPR_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C) if (WITH_LIBRARY_VERSIONING) - set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION}) + set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION} SOVERSION ${WINPR_API_VERSION}) endif() add_definitions(${WINPR_DEFINITIONS})