From bbb6bf6b430b057130127cd77efd1199102718c8 Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Wed, 21 Dec 2016 15:25:03 +0100 Subject: [PATCH] Include major version number in library names Currently it is not possible to cleanly install multiple major version of FreeRDP concurrently as some of the development libraries (.so files) files can conflict. This change renames all libraries to include the major version number in the library name to fix this limitation. The list of changed libraries: libwinpr-tools.so -> libwinpr-tools2.so libwinpr.so -> libwinpr2.so libfreerdp.so -> libfreerdp2.so libfreerdp-client.so -> libfreerdp-client2.so libfreerdp-shadow.so -> libfreerdp-shadow2.so libfreerdp-server.so -> libfreerdp-server2.so libfreerdp-shadow-subsystem.so -> libfreerdp-shadow-subsystem2.so libuwac.so -> libuwac0.so As the library names have changed, projects that use FreeRDP will need to update their dependencies. - If pkg-config or cmake find modules are used, reconfiguration might be sufficient. Fixes #3460 --- client/common/CMakeLists.txt | 1 + client/freerdp-client.pc.in | 2 +- libfreerdp/CMakeLists.txt | 1 + libfreerdp/freerdp.pc.in | 2 +- server/common/CMakeLists.txt | 1 + server/freerdp-server.pc.in | 2 +- server/shadow/CMakeLists.txt | 2 ++ server/shadow/freerdp-shadow.pc.in | 4 ++-- uwac/libuwac/CMakeLists.txt | 1 + uwac/uwac.pc.in | 2 +- winpr/libwinpr/CMakeLists.txt | 1 + winpr/tools/CMakeLists.txt | 1 + winpr/tools/winpr-tools.pc.in | 2 +- winpr/winpr.pc.in | 2 +- 14 files changed, 16 insertions(+), 8 deletions(-) diff --git a/client/common/CMakeLists.txt b/client/common/CMakeLists.txt index bf4480942..e4691ab4d 100644 --- a/client/common/CMakeLists.txt +++ b/client/common/CMakeLists.txt @@ -57,6 +57,7 @@ endif() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_API_VERSION}) include_directories(${OPENSSL_INCLUDE_DIR}) if (WITH_LIBRARY_VERSIONING) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) diff --git a/client/freerdp-client.pc.in b/client/freerdp-client.pc.in index 54d40c5ff..92b334674 100644 --- a/client/freerdp-client.pc.in +++ b/client/freerdp-client.pc.in @@ -2,7 +2,7 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=@CMAKE_INSTALL_PREFIX@ libdir=@CMAKE_INSTALL_FULL_LIBDIR@ includedir=${prefix}/@FREERDP_INCLUDE_DIR@ -libs=-lfreerdp-client +libs=-lfreerdp-client@FREERDP_API_VERSION@ Name: FreeRDP client Description: FreeRDP: A Remote Desktop Protocol Implementation diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt index 82c7ec3e5..ae6e6d3f2 100644 --- a/libfreerdp/CMakeLists.txt +++ b/libfreerdp/CMakeLists.txt @@ -291,6 +291,7 @@ add_library(${MODULE_NAME} ${LIBFREERDP_SRCS}) add_definitions(${LIBFREERDP_DEFINITIONS}) set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C) +set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_VERSION_MAJOR}) if (WITH_LIBRARY_VERSIONING) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) diff --git a/libfreerdp/freerdp.pc.in b/libfreerdp/freerdp.pc.in index 456b284fd..a5d5c8bde 100644 --- a/libfreerdp/freerdp.pc.in +++ b/libfreerdp/freerdp.pc.in @@ -2,7 +2,7 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=@CMAKE_INSTALL_PREFIX@ libdir=@CMAKE_INSTALL_FULL_LIBDIR@ includedir=${prefix}/@FREERDP_INCLUDE_DIR@ -libs=-lfreerdp +libs=-lfreerdp@FREERDP_API_VERSION@ Name: FreeRDP Description: FreeRDP: A Remote Desktop Protocol Implementation diff --git a/server/common/CMakeLists.txt b/server/common/CMakeLists.txt index 009d5662a..1580eb84f 100644 --- a/server/common/CMakeLists.txt +++ b/server/common/CMakeLists.txt @@ -54,6 +54,7 @@ if (WIN32) endif() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_API_VERSION}) if (WITH_LIBRARY_VERSIONING) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) diff --git a/server/freerdp-server.pc.in b/server/freerdp-server.pc.in index f9ef4c345..8d5fb4dbf 100644 --- a/server/freerdp-server.pc.in +++ b/server/freerdp-server.pc.in @@ -2,7 +2,7 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=@CMAKE_INSTALL_PREFIX@ libdir=@CMAKE_INSTALL_FULL_LIBDIR@ includedir=${prefix}/@FREERDP_INCLUDE_DIR@ -libs=-lfreerdp-server +libs=-lfreerdp-server@FREERDP_API_VERSION@ Name: FreeRDP server Description: FreeRDP: A Remote Desktop Protocol Implementation diff --git a/server/shadow/CMakeLists.txt b/server/shadow/CMakeLists.txt index 8e4e8e119..49c4eeb14 100644 --- a/server/shadow/CMakeLists.txt +++ b/server/shadow/CMakeLists.txt @@ -81,6 +81,7 @@ list(APPEND ${MODULE_PREFIX}_LIBS rdtk) target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS}) +set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_VERSION_MAJOR}) if (WITH_LIBRARY_VERSIONING) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) endif() @@ -284,6 +285,7 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-shadow freerdp winpr) target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS}) +set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_API_VERSION}) if (WITH_LIBRARY_VERSIONING) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) endif() diff --git a/server/shadow/freerdp-shadow.pc.in b/server/shadow/freerdp-shadow.pc.in index 5c8c4629c..615ae7f6b 100644 --- a/server/shadow/freerdp-shadow.pc.in +++ b/server/shadow/freerdp-shadow.pc.in @@ -2,14 +2,14 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=@CMAKE_INSTALL_PREFIX@ libdir=@CMAKE_INSTALL_FULL_LIBDIR@ includedir=${prefix}/@FREERDP_INCLUDE_DIR@ -libs=-lfreerdp-shadow -lfreerdp-shadow-subsystem +libs=-lfreerdp-shadow@FREERDP_API_VERSION@ -lfreerdp-shadow-subsystem@FREERDP_API_VERSION@ Name: FreeRDP shadow Description: FreeRDP: A Remote Desktop Protocol Implementation URL: http://www.freerdp.com/ Version: @FREERDP_VERSION@ Requires: -Requires.private: @WINPR_PKG_CONFIG_FILENAME@ freerdp@FREERDP_VERSION_MAJOR@ +Requires.private: @WINPR_PKG_CONFIG_FILENAME@ freerdp@FREERDP_API_VERSION@ Libs: -L${libdir} ${libs} Libs.private: -ldl -lpthread Cflags: -I${includedir} diff --git a/uwac/libuwac/CMakeLists.txt b/uwac/libuwac/CMakeLists.txt index d40970735..6a98077e1 100644 --- a/uwac/libuwac/CMakeLists.txt +++ b/uwac/libuwac/CMakeLists.txt @@ -64,6 +64,7 @@ set(${MODULE_PREFIX}_SRCS add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${UWAC_API_VERSION}) if (WITH_LIBRARY_VERSIONING) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${UWAC_VERSION} SOVERSION ${UWAC_API_VERSION}) endif() diff --git a/uwac/uwac.pc.in b/uwac/uwac.pc.in index 66b477e98..0885b0e60 100644 --- a/uwac/uwac.pc.in +++ b/uwac/uwac.pc.in @@ -2,7 +2,7 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=@CMAKE_INSTALL_PREFIX@ libdir=@CMAKE_INSTALL_FULL_LIBDIR@ includedir=${prefix}/@UWAC_INCLUDE_DIR@ -libs=-luwac +libs=-luwac@UWAC_VERSION_MAJOR@ Name: uwac Description: uwac: using wayland as a client diff --git a/winpr/libwinpr/CMakeLists.txt b/winpr/libwinpr/CMakeLists.txt index 7e8fcc5e1..4b7aa86b8 100644 --- a/winpr/libwinpr/CMakeLists.txt +++ b/winpr/libwinpr/CMakeLists.txt @@ -120,6 +120,7 @@ endif() add_library(${MODULE_NAME} ${WINPR_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C) +set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${WINPR_API_VERSION}) if (WITH_LIBRARY_VERSIONING) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION} SOVERSION ${WINPR_API_VERSION}) endif() diff --git a/winpr/tools/CMakeLists.txt b/winpr/tools/CMakeLists.txt index f792a9b14..4cfe00d7d 100644 --- a/winpr/tools/CMakeLists.txt +++ b/winpr/tools/CMakeLists.txt @@ -104,6 +104,7 @@ endif() add_library(${MODULE_NAME} ${WINPR_TOOLS_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C) +set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${WINPR_TOOLS_API_VERSION}) if (WITH_LIBRARY_VERSIONING) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_TOOLS_VERSION} SOVERSION ${WINPR_TOOLS_API_VERSION}) endif() diff --git a/winpr/tools/winpr-tools.pc.in b/winpr/tools/winpr-tools.pc.in index cd05c9a61..f406e9844 100644 --- a/winpr/tools/winpr-tools.pc.in +++ b/winpr/tools/winpr-tools.pc.in @@ -2,7 +2,7 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=@CMAKE_INSTALL_PREFIX@ libdir=@CMAKE_INSTALL_FULL_LIBDIR@ includedir=${prefix}/@WINPR_INCLUDE_DIR@ -libs=-lwinpr-tools +libs=-lwinpr-tools@WINPR_TOOLS_API_VERSION@ Name: WinPR Description: WinPR: Windows Portable Runtime diff --git a/winpr/winpr.pc.in b/winpr/winpr.pc.in index ac509c01c..6b0c950fb 100644 --- a/winpr/winpr.pc.in +++ b/winpr/winpr.pc.in @@ -2,7 +2,7 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=@CMAKE_INSTALL_PREFIX@ libdir=@CMAKE_INSTALL_FULL_LIBDIR@ includedir=${prefix}/@WINPR_INCLUDE_DIR@ -libs=-lwinpr +libs=-lwinpr@WINPR_API_VERSION@ Name: WinPR Description: WinPR: Windows Portable Runtime