From 25363c05d66723bc0b22cde631fa53aed8b9accf Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Wed, 30 Dec 2015 18:42:54 +0100 Subject: [PATCH 1/4] update .gitignore files * add missing entries --- server/shadow/.gitignore | 2 +- winpr/include/winpr/.gitignore | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/server/shadow/.gitignore b/server/shadow/.gitignore index 662d7d541..d21ea72ef 100644 --- a/server/shadow/.gitignore +++ b/server/shadow/.gitignore @@ -1,2 +1,2 @@ -freerdp-shadow +freerdp-shadow-cli diff --git a/winpr/include/winpr/.gitignore b/winpr/include/winpr/.gitignore index 67020331b..60c26bb4f 100644 --- a/winpr/include/winpr/.gitignore +++ b/winpr/include/winpr/.gitignore @@ -1 +1,2 @@ version.h +wtypes.h From b8136a376992dc0ba037ca402e7a7c4eca6c412b Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Wed, 30 Dec 2015 18:45:09 +0100 Subject: [PATCH 2/4] build: remove FREERDP_MONOLITHIC_BUILD FREERDP_MONOLITHIC_BUILD was obsolete for a while and unused --- CMakeLists.txt | 5 +---- FreeRDPConfig.cmake.in | 1 - cmake/ComplexLibrary.cmake | 28 ---------------------------- winpr/CMakeLists.txt | 4 +--- winpr/WinPRConfig.cmake.in | 1 - 5 files changed, 2 insertions(+), 37 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 922b59719..4b19b2981 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -806,12 +806,9 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10") set(FREERDP_INCLUDE_DIR "include") - # keep for legacy builds - set(FREERDP_MONOLITHIC_BUILD OFF) - configure_package_config_file(FreeRDPConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FreeRDPConfig.cmake INSTALL_DESTINATION ${FREERDP_CMAKE_INSTALL_DIR} - PATH_VARS FREERDP_INCLUDE_DIR FREERDP_MONOLITHIC_BUILD) + PATH_VARS FREERDP_INCLUDE_DIR) write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FreeRDPConfigVersion.cmake VERSION ${FREERDP_VERSION} COMPATIBILITY SameMajorVersion) diff --git a/FreeRDPConfig.cmake.in b/FreeRDPConfig.cmake.in index 7dcea99de..a2321e727 100644 --- a/FreeRDPConfig.cmake.in +++ b/FreeRDPConfig.cmake.in @@ -4,7 +4,6 @@ set(FreeRDP_VERSION_MAJOR "@FREERDP_VERSION_MAJOR@") set(FreeRDP_VERSION_MINOR "@FREERDP_VERSION_MINOR@") set(FreeRDP_VERSION_REVISION "@FREERDP_VERSION_REVISION@") -set(FreeRDP_MONOLITHIC_BUILD "@FREERDP_MONOLITHIC_BUILD@") set_and_check(FreeRDP_INCLUDE_DIR "@PACKAGE_FREERDP_INCLUDE_DIR@") diff --git a/cmake/ComplexLibrary.cmake b/cmake/ComplexLibrary.cmake index c6c54aae2..703e9376a 100644 --- a/cmake/ComplexLibrary.cmake +++ b/cmake/ComplexLibrary.cmake @@ -3,34 +3,6 @@ include(EchoTarget) include(CMakeParseArguments) -macro(set_complex_link_libraries) - - set(PREFIX "COMPLEX_LIBRARY") - - cmake_parse_arguments(${PREFIX} - "INTERNAL" - "MODULE;VARIABLE;MONOLITHIC" - "MODULES" - ${ARGN}) - - if(NOT DEFINED ${PREFIX}_MONOLITHIC) - set(${PREFIX}_MONOLITHIC FALSE) - endif() - - if(${${PREFIX}_MONOLITHIC}) - if(${${PREFIX}_INTERNAL}) - set(${PREFIX}_LIBS) - else() - set(${PREFIX}_LIBS ${${PREFIX}_MODULE}) - endif() - else() - set(${PREFIX}_LIBS ${${PREFIX}_MODULES}) - endif() - - set(${${PREFIX}_VARIABLE} ${${${PREFIX}_VARIABLE}} ${${PREFIX}_LIBS}) - -endmacro(set_complex_link_libraries) - # - add a new library to a module for export # MODULE - module the library belongs to # LIBNAME - name of the library diff --git a/winpr/CMakeLists.txt b/winpr/CMakeLists.txt index 12e515e6f..1021d164e 100644 --- a/winpr/CMakeLists.txt +++ b/winpr/CMakeLists.txt @@ -164,12 +164,10 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10") set(WINPR_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/WinPR") set(WINPR_INCLUDE_DIR "include") - # Keep this for legacy builds - set(WINPR_MONOLITHIC_BUILD OFF) configure_package_config_file(WinPRConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/WinPRConfig.cmake INSTALL_DESTINATION ${WINPR_CMAKE_INSTALL_DIR} - PATH_VARS WINPR_INCLUDE_DIR WINPR_MONOLITHIC_BUILD) + PATH_VARS WINPR_INCLUDE_DIR) write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/WinPRConfigVersion.cmake VERSION ${WINPR_VERSION} COMPATIBILITY SameMajorVersion) diff --git a/winpr/WinPRConfig.cmake.in b/winpr/WinPRConfig.cmake.in index 3a7a6c005..00c69c984 100644 --- a/winpr/WinPRConfig.cmake.in +++ b/winpr/WinPRConfig.cmake.in @@ -4,7 +4,6 @@ set(WinPR_VERSION_MAJOR "@WINPR_VERSION_MAJOR@") set(WinPR_VERSION_MINOR "@WINPR_VERSION_MINOR@") set(WinPR_VERSION_REVISION "@WINPR_VERSION_REVISION@") -set(WinPR_MONOLITHIC_BUILD "@WINPR_MONOLITHIC_BUILD@") set_and_check(WinPR_INCLUDE_DIR "@PACKAGE_WINPR_INCLUDE_DIR@") From 6fa36081112c46951096cddfacc0f760e4728b25 Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Fri, 8 Jan 2016 14:07:35 +0100 Subject: [PATCH 3/4] cleanup cmake exports and pkg-config files With this commit the "exported" components (usable with pkg-config and cmake find module package) * winpr - winpr library and headers * freerdp - core library and headers * freerdp-client - client specific library * freerdp-server - server specific library * rdtk - rdtk headers and library To allow the installation of multiple different version (different major number) the include files were moved into the respective sub folder: freerdp -> freerdp{MAJOR}/freerdp (currently freerdp2/freerdp/) winpr -> winpr{MAJOR}/winpr (currently winrp1/winpr/) rdtk -> rdpk{MAJOR}/rdtk (currently rdtk0/rdtk/ The generated pkg-config and cmake find modules now also include the major version number. Currently the following pkg-config are generated and installed. * winpr1 * freerdp2 * freerdp-server2 * freerdp-client2 * rdtk0 As cmake is able to handle multiple versions out of the box the following can be used to find a specific module: find_package(WinPR) find_package(FreeRDP) find_package(FreeRDP-Server) find_package(FreeRDP-Client) find_package(RdTk) As cmake doesn't automatically resolve dependencies for packages it is necessary to manually include the requirements. For example if FreeRDP-Client is required WinPR and FreeRDP need to be included (find_package) as well. This commit also fixes the installation when STATIC_CHANNELS are built. WITH STATIC_CHANNELS all channels are linked into libfreerdp-client, for this all channels are generated as linker archive and linked together in the final step. Before the intermediate linker archives were, although not required and useful, installed. Same applies for server side channels. --- CMakeLists.txt | 45 ++++--------------- channels/CMakeLists.txt | 17 +++++++ channels/audin/client/CMakeLists.txt | 1 - channels/audin/client/alsa/CMakeLists.txt | 7 --- channels/audin/client/mac/CMakeLists.txt | 3 -- channels/audin/client/opensles/CMakeLists.txt | 2 - channels/audin/client/oss/CMakeLists.txt | 2 - channels/audin/client/pulse/CMakeLists.txt | 2 - channels/audin/client/winmm/CMakeLists.txt | 2 - channels/audin/server/CMakeLists.txt | 2 - channels/cliprdr/client/CMakeLists.txt | 2 - channels/cliprdr/server/CMakeLists.txt | 2 - channels/disp/client/CMakeLists.txt | 1 - channels/drdynvc/client/CMakeLists.txt | 1 - channels/drdynvc/server/CMakeLists.txt | 2 - channels/drive/client/CMakeLists.txt | 1 - channels/echo/client/CMakeLists.txt | 1 - channels/echo/server/CMakeLists.txt | 2 - channels/encomsp/client/CMakeLists.txt | 6 --- channels/encomsp/server/CMakeLists.txt | 2 - channels/parallel/client/CMakeLists.txt | 1 - channels/printer/client/CMakeLists.txt | 1 - channels/rail/client/CMakeLists.txt | 2 - channels/rdpdr/client/CMakeLists.txt | 2 - channels/rdpdr/server/CMakeLists.txt | 2 - channels/rdpei/client/CMakeLists.txt | 1 - channels/rdpei/server/CMakeLists.txt | 2 - channels/rdpgfx/client/CMakeLists.txt | 2 - channels/rdpsnd/client/CMakeLists.txt | 2 - channels/rdpsnd/client/alsa/CMakeLists.txt | 2 - channels/rdpsnd/client/ios/CMakeLists.txt | 2 - channels/rdpsnd/client/mac/CMakeLists.txt | 2 - .../rdpsnd/client/opensles/CMakeLists.txt | 2 - channels/rdpsnd/client/oss/CMakeLists.txt | 2 - channels/rdpsnd/client/pulse/CMakeLists.txt | 2 - channels/rdpsnd/client/winmm/CMakeLists.txt | 1 - channels/rdpsnd/server/CMakeLists.txt | 2 - channels/remdesk/client/CMakeLists.txt | 2 - channels/remdesk/server/CMakeLists.txt | 4 -- channels/serial/client/CMakeLists.txt | 1 - channels/server/channels.c | 9 ++++ channels/smartcard/client/CMakeLists.txt | 2 - channels/tsmf/client/CMakeLists.txt | 2 - channels/tsmf/client/alsa/CMakeLists.txt | 2 - channels/tsmf/client/ffmpeg/CMakeLists.txt | 1 - channels/tsmf/client/gstreamer/CMakeLists.txt | 6 --- channels/tsmf/client/oss/CMakeLists.txt | 2 - channels/tsmf/client/pulse/CMakeLists.txt | 2 - channels/urbdrc/client/CMakeLists.txt | 2 - channels/urbdrc/client/libusb/CMakeLists.txt | 2 - client/.gitignore | 1 + client/CMakeLists.txt | 21 +++++++++ client/FreeRDP-ClientConfig.cmake.in | 10 +++++ client/Windows/CMakeLists.txt | 2 +- client/X11/CMakeLists.txt | 4 +- client/common/CMakeLists.txt | 12 +++-- client/freerdp-client.pc.in | 15 +++++++ include/CMakeLists.txt | 25 ++++++----- libfreerdp/CMakeLists.txt | 24 ++++++++++ .../FreeRDPConfig.cmake.in | 0 freerdp.pc.in => libfreerdp/freerdp.pc.in | 8 ++-- rdtk/CMakeLists.txt | 14 +++--- rdtk/include/CMakeLists.txt | 2 +- rdtk/rdtk.pc.in | 15 +++++++ server/.gitignore | 1 + server/CMakeLists.txt | 22 +++++++++ server/FreeRDP-ServerConfig.cmake.in | 10 +++++ server/common/CMakeLists.txt | 20 ++++----- server/freerdp-server.pc.in | 15 +++++++ server/shadow/CMakeLists.txt | 2 - third-party/.gitignore | 1 + winpr/.gitignore | 1 - winpr/CMakeLists.txt | 12 +++-- winpr/include/CMakeLists.txt | 5 ++- winpr.pc.in => winpr/winpr.pc.in | 8 ++-- 75 files changed, 228 insertions(+), 192 deletions(-) create mode 100644 client/FreeRDP-ClientConfig.cmake.in create mode 100644 client/freerdp-client.pc.in rename FreeRDPConfig.cmake.in => libfreerdp/FreeRDPConfig.cmake.in (100%) rename freerdp.pc.in => libfreerdp/freerdp.pc.in (68%) create mode 100644 rdtk/rdtk.pc.in create mode 100644 server/FreeRDP-ServerConfig.cmake.in create mode 100644 server/freerdp-server.pc.in rename winpr.pc.in => winpr/winpr.pc.in (74%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b19b2981..68ff44e06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,6 +79,7 @@ if (FREERDP_VERSION_SUFFIX) else() set(FREERDP_VERSION_FULL "${FREERDP_VERSION}") endif() +set(FREERDP_INCLUDE_DIR "include/freerdp${FREERDP_VERSION_MAJOR}/") # Allow to search the host machine for git if(ANDROID OR IOS) @@ -787,6 +788,14 @@ if(WITH_CHANNELS) add_subdirectory(channels) endif() +if (${CMAKE_VERSION} VERSION_LESS 2.8.12) + set(PUBLIC_KEYWORD "") + set(PRIVATE_KEYWORD "") +else() + set(PUBLIC_KEYWORD "PUBLIC") + set(PRIVATE_KEYWORD "PRIVATE") +endif() + if(WITH_CLIENT_COMMON OR WITH_CLIENT) add_subdirectory(client) endif() @@ -795,31 +804,6 @@ if(WITH_SERVER) add_subdirectory(server) endif() - -# Exporting - -if(${CMAKE_VERSION} VERSION_GREATER "2.8.10") - - export(PACKAGE freerdp) - - set(FREERDP_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/FreeRDP") - - set(FREERDP_INCLUDE_DIR "include") - - configure_package_config_file(FreeRDPConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FreeRDPConfig.cmake - INSTALL_DESTINATION ${FREERDP_CMAKE_INSTALL_DIR} - PATH_VARS FREERDP_INCLUDE_DIR) - - write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FreeRDPConfigVersion.cmake - VERSION ${FREERDP_VERSION} COMPATIBILITY SameMajorVersion) - - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FreeRDPConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FreeRDPConfigVersion.cmake - DESTINATION ${FREERDP_CMAKE_INSTALL_DIR}) - - install(EXPORT FreeRDPTargets DESTINATION ${FREERDP_CMAKE_INSTALL_DIR}) - -endif() - # Packaging set(CMAKE_CPACK_INCLUDE_FILE "CMakeCPack.cmake") @@ -835,14 +819,3 @@ endif() #message("VENDOR: ${VENDOR} CLIENT_VENDOR_PATH: ${CLIENT_VENDOR_PATH} CMAKE_CPACK_INCLUDE_FILE: ${CMAKE_CPACK_INCLUDE_FILE}") include(${CMAKE_CPACK_INCLUDE_FILE}) - -set(FREERDP_PC_LIBS "-lfreerdp -lfreerdp-client") -set(WINPR_PC_LIBS "-lwinpr") -if (WITH_SERVER) - set(FREERDP_PC_LIBS "${FREERDP_PC_LIBS} -lfreerdp-server") -endif() - -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp.pc @ONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/winpr.pc.in ${CMAKE_CURRENT_BINARY_DIR}/winpr.pc @ONLY) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/winpr.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/channels/CMakeLists.txt b/channels/CMakeLists.txt index cb7880c34..548a0057b 100644 --- a/channels/CMakeLists.txt +++ b/channels/CMakeLists.txt @@ -154,6 +154,20 @@ macro(add_channel_client_subsystem _channel_prefix _channel_name _subsystem _typ endif() endmacro(add_channel_client_subsystem) +macro(channel_install _targets _destination _export_target) + if (NOT STATIC_CHANNELS OR ${CMAKE_VERSION} VERSION_LESS 2.8.12) + install(TARGETS ${_targets} DESTINATION ${_destination} EXPORT ${_export_target}) + endif() +endmacro(channel_install) + +macro(server_channel_install _targets _destination) + channel_install(${_targets} ${_destination} "FreeRDP-ServerTargets") +endmacro(server_channel_install) + +macro(client_channel_install _targets _destination) + channel_install(${_targets} ${_destination} "FreeRDP-ClientTargets") +endmacro(client_channel_install) + macro(add_channel_client_library _module_prefix _module_name _channel_name _dynamic _entry) if(${_dynamic} AND (NOT STATIC_CHANNELS)) # On windows create dll version information. @@ -174,6 +188,7 @@ macro(add_channel_client_library _module_prefix _module_name _channel_name _dyna endif() add_library(${_module_name} ${${_module_prefix}_SRCS}) + client_channel_install(${_module_name} ${FREERDP_ADDIN_PATH}) else() set(${_module_prefix}_STATIC ON PARENT_SCOPE) set(${_module_prefix}_NAME ${_module_name} PARENT_SCOPE) @@ -203,6 +218,7 @@ macro(add_channel_client_subsystem_library _module_prefix _module_name _channel_ endif() add_library(${_module_name} ${${_module_prefix}_SRCS}) + client_channel_install(${_module_name} ${FREERDP_ADDIN_PATH}) else() set(${_module_prefix}_STATIC ON PARENT_SCOPE) set(${_module_prefix}_NAME ${_module_name} PARENT_SCOPE) @@ -230,6 +246,7 @@ macro(add_channel_server_library _module_prefix _module_name _channel_name _dyna endif() add_library(${_module_name} ${${_module_prefix}_SRCS}) + server_channel_install(${_module_name} ${FREERDP_ADDIN_PATH}) else() set(${_module_prefix}_STATIC ON PARENT_SCOPE) set(${_module_prefix}_NAME ${_module_name} PARENT_SCOPE) diff --git a/channels/audin/client/CMakeLists.txt b/channels/audin/client/CMakeLists.txt index 32e3e3bde..1f593b8e2 100644 --- a/channels/audin/client/CMakeLists.txt +++ b/channels/audin/client/CMakeLists.txt @@ -27,7 +27,6 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE target_link_libraries(${MODULE_NAME} freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) endif() diff --git a/channels/audin/client/alsa/CMakeLists.txt b/channels/audin/client/alsa/CMakeLists.txt index bb2df3230..9a90387d9 100644 --- a/channels/audin/client/alsa/CMakeLists.txt +++ b/channels/audin/client/alsa/CMakeLists.txt @@ -30,10 +30,3 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set(${MODULE_PREFIX}_LIBS freerdp ${ALSA_LIBRARIES}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - -if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) - install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) -endif() - diff --git a/channels/audin/client/mac/CMakeLists.txt b/channels/audin/client/mac/CMakeLists.txt index feca0d622..a5371c1ea 100644 --- a/channels/audin/client/mac/CMakeLists.txt +++ b/channels/audin/client/mac/CMakeLists.txt @@ -29,6 +29,3 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set(${MODULE_PREFIX}_LIBS freerdp ${MAC_LIBRARIES}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - diff --git a/channels/audin/client/opensles/CMakeLists.txt b/channels/audin/client/opensles/CMakeLists.txt index 8844c22ec..abc69219f 100644 --- a/channels/audin/client/opensles/CMakeLists.txt +++ b/channels/audin/client/opensles/CMakeLists.txt @@ -31,5 +31,3 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set(${MODULE_PREFIX}_LIBS freerdp ${OPENSLES_LIBRARIES}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/audin/client/oss/CMakeLists.txt b/channels/audin/client/oss/CMakeLists.txt index 1b34fd0de..315e71e60 100644 --- a/channels/audin/client/oss/CMakeLists.txt +++ b/channels/audin/client/oss/CMakeLists.txt @@ -31,5 +31,3 @@ set(${MODULE_PREFIX}_LIBS freerdp ${OSS_LIBRARIES}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - diff --git a/channels/audin/client/pulse/CMakeLists.txt b/channels/audin/client/pulse/CMakeLists.txt index 5047aaef5..10000f4b3 100644 --- a/channels/audin/client/pulse/CMakeLists.txt +++ b/channels/audin/client/pulse/CMakeLists.txt @@ -30,5 +30,3 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set(${MODULE_PREFIX}_LIBS freerdp ${PULSE_LIBRARY}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/audin/client/winmm/CMakeLists.txt b/channels/audin/client/winmm/CMakeLists.txt index 52dd91dd6..c7d3e2b14 100644 --- a/channels/audin/client/winmm/CMakeLists.txt +++ b/channels/audin/client/winmm/CMakeLists.txt @@ -31,8 +31,6 @@ set(${MODULE_PREFIX}_LIBS freerdp winmm.lib) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) endif() diff --git a/channels/audin/server/CMakeLists.txt b/channels/audin/server/CMakeLists.txt index be2ee52b5..4d4004fb3 100644 --- a/channels/audin/server/CMakeLists.txt +++ b/channels/audin/server/CMakeLists.txt @@ -26,6 +26,4 @@ add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE target_link_libraries(${MODULE_NAME} freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server") diff --git a/channels/cliprdr/client/CMakeLists.txt b/channels/cliprdr/client/CMakeLists.txt index 867ed7230..c8ca54482 100644 --- a/channels/cliprdr/client/CMakeLists.txt +++ b/channels/cliprdr/client/CMakeLists.txt @@ -27,6 +27,4 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE set(${MODULE_PREFIX}_LIBS freerdp winpr) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/cliprdr/server/CMakeLists.txt b/channels/cliprdr/server/CMakeLists.txt index 5bd32583a..911c7a4ad 100644 --- a/channels/cliprdr/server/CMakeLists.txt +++ b/channels/cliprdr/server/CMakeLists.txt @@ -25,6 +25,4 @@ add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE target_link_libraries(${MODULE_NAME} freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server") diff --git a/channels/disp/client/CMakeLists.txt b/channels/disp/client/CMakeLists.txt index 61adc34d3..6bed7bfff 100644 --- a/channels/disp/client/CMakeLists.txt +++ b/channels/disp/client/CMakeLists.txt @@ -31,7 +31,6 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) diff --git a/channels/drdynvc/client/CMakeLists.txt b/channels/drdynvc/client/CMakeLists.txt index 0c323c0cc..244d1985f 100644 --- a/channels/drdynvc/client/CMakeLists.txt +++ b/channels/drdynvc/client/CMakeLists.txt @@ -23,6 +23,5 @@ set(${MODULE_PREFIX}_SRCS add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntry") -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/drdynvc/server/CMakeLists.txt b/channels/drdynvc/server/CMakeLists.txt index d0de5d5d9..fe2bd61c2 100644 --- a/channels/drdynvc/server/CMakeLists.txt +++ b/channels/drdynvc/server/CMakeLists.txt @@ -27,7 +27,5 @@ add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE target_link_libraries(${MODULE_NAME} freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server") diff --git a/channels/drive/client/CMakeLists.txt b/channels/drive/client/CMakeLists.txt index 64495875f..3d5afae04 100644 --- a/channels/drive/client/CMakeLists.txt +++ b/channels/drive/client/CMakeLists.txt @@ -35,7 +35,6 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE target_link_libraries(${MODULE_NAME} winpr freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) diff --git a/channels/echo/client/CMakeLists.txt b/channels/echo/client/CMakeLists.txt index d7b69576d..7c15794dc 100644 --- a/channels/echo/client/CMakeLists.txt +++ b/channels/echo/client/CMakeLists.txt @@ -29,7 +29,6 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE target_link_libraries(${MODULE_NAME} freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) diff --git a/channels/echo/server/CMakeLists.txt b/channels/echo/server/CMakeLists.txt index 3d6b60807..e69b55501 100644 --- a/channels/echo/server/CMakeLists.txt +++ b/channels/echo/server/CMakeLists.txt @@ -26,7 +26,5 @@ add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE target_link_libraries(${MODULE_NAME} freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server") diff --git a/channels/encomsp/client/CMakeLists.txt b/channels/encomsp/client/CMakeLists.txt index f43bf6258..dd855b830 100644 --- a/channels/encomsp/client/CMakeLists.txt +++ b/channels/encomsp/client/CMakeLists.txt @@ -26,10 +26,4 @@ set(${MODULE_PREFIX}_SRCS add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntry") - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/encomsp/server/CMakeLists.txt b/channels/encomsp/server/CMakeLists.txt index f0ea76b1c..10ac0c6d9 100644 --- a/channels/encomsp/server/CMakeLists.txt +++ b/channels/encomsp/server/CMakeLists.txt @@ -31,7 +31,5 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server") diff --git a/channels/parallel/client/CMakeLists.txt b/channels/parallel/client/CMakeLists.txt index 8713a3da6..21f4a03d6 100644 --- a/channels/parallel/client/CMakeLists.txt +++ b/channels/parallel/client/CMakeLists.txt @@ -26,7 +26,6 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE target_link_libraries(${MODULE_NAME} freerdp winpr) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) diff --git a/channels/printer/client/CMakeLists.txt b/channels/printer/client/CMakeLists.txt index be756452a..b433d8a4f 100644 --- a/channels/printer/client/CMakeLists.txt +++ b/channels/printer/client/CMakeLists.txt @@ -48,7 +48,6 @@ endif() target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) diff --git a/channels/rail/client/CMakeLists.txt b/channels/rail/client/CMakeLists.txt index 745ac1689..a4653e08d 100644 --- a/channels/rail/client/CMakeLists.txt +++ b/channels/rail/client/CMakeLists.txt @@ -31,7 +31,5 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE target_link_libraries(${MODULE_NAME} freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/rdpdr/client/CMakeLists.txt b/channels/rdpdr/client/CMakeLists.txt index c672c5238..488c174c2 100644 --- a/channels/rdpdr/client/CMakeLists.txt +++ b/channels/rdpdr/client/CMakeLists.txt @@ -33,7 +33,5 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE target_link_libraries(${MODULE_NAME} winpr freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/rdpdr/server/CMakeLists.txt b/channels/rdpdr/server/CMakeLists.txt index 8da697f6d..63f8a0437 100644 --- a/channels/rdpdr/server/CMakeLists.txt +++ b/channels/rdpdr/server/CMakeLists.txt @@ -27,7 +27,5 @@ add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE target_link_libraries(${MODULE_NAME} freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server") diff --git a/channels/rdpei/client/CMakeLists.txt b/channels/rdpei/client/CMakeLists.txt index 7cad5201a..723cbc0fc 100644 --- a/channels/rdpei/client/CMakeLists.txt +++ b/channels/rdpei/client/CMakeLists.txt @@ -30,7 +30,6 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE target_link_libraries(${MODULE_NAME} winpr freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) diff --git a/channels/rdpei/server/CMakeLists.txt b/channels/rdpei/server/CMakeLists.txt index a20c36cec..9f531da0d 100644 --- a/channels/rdpei/server/CMakeLists.txt +++ b/channels/rdpei/server/CMakeLists.txt @@ -33,7 +33,5 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server") diff --git a/channels/rdpgfx/client/CMakeLists.txt b/channels/rdpgfx/client/CMakeLists.txt index d657a2f79..1dbf82f80 100644 --- a/channels/rdpgfx/client/CMakeLists.txt +++ b/channels/rdpgfx/client/CMakeLists.txt @@ -33,8 +33,6 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE target_link_libraries(${MODULE_NAME} winpr freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) endif() diff --git a/channels/rdpsnd/client/CMakeLists.txt b/channels/rdpsnd/client/CMakeLists.txt index ce09b8b17..f2fc1aa16 100644 --- a/channels/rdpsnd/client/CMakeLists.txt +++ b/channels/rdpsnd/client/CMakeLists.txt @@ -27,8 +27,6 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE target_link_libraries(${MODULE_NAME} winpr freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/rdpsnd/client/alsa/CMakeLists.txt b/channels/rdpsnd/client/alsa/CMakeLists.txt index cdbce489d..761a639d0 100644 --- a/channels/rdpsnd/client/alsa/CMakeLists.txt +++ b/channels/rdpsnd/client/alsa/CMakeLists.txt @@ -33,6 +33,4 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ALSA_LIBRARIES}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client/ALSA") diff --git a/channels/rdpsnd/client/ios/CMakeLists.txt b/channels/rdpsnd/client/ios/CMakeLists.txt index c2beec711..ae9f9a797 100644 --- a/channels/rdpsnd/client/ios/CMakeLists.txt +++ b/channels/rdpsnd/client/ios/CMakeLists.txt @@ -42,6 +42,4 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client/ios") diff --git a/channels/rdpsnd/client/mac/CMakeLists.txt b/channels/rdpsnd/client/mac/CMakeLists.txt index 035d16cb4..449b345a1 100644 --- a/channels/rdpsnd/client/mac/CMakeLists.txt +++ b/channels/rdpsnd/client/mac/CMakeLists.txt @@ -42,6 +42,4 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client/Mac") diff --git a/channels/rdpsnd/client/opensles/CMakeLists.txt b/channels/rdpsnd/client/opensles/CMakeLists.txt index 7153eed82..410a4b425 100644 --- a/channels/rdpsnd/client/opensles/CMakeLists.txt +++ b/channels/rdpsnd/client/opensles/CMakeLists.txt @@ -31,5 +31,3 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set(${MODULE_PREFIX}_LIBS freerdp ${OPENSLES_LIBRARIES}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/rdpsnd/client/oss/CMakeLists.txt b/channels/rdpsnd/client/oss/CMakeLists.txt index c5f9618fc..53ae5fa7b 100644 --- a/channels/rdpsnd/client/oss/CMakeLists.txt +++ b/channels/rdpsnd/client/oss/CMakeLists.txt @@ -33,6 +33,4 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${OSS_LIBRARIES}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client/OSS") diff --git a/channels/rdpsnd/client/pulse/CMakeLists.txt b/channels/rdpsnd/client/pulse/CMakeLists.txt index 79095223e..a12d71844 100644 --- a/channels/rdpsnd/client/pulse/CMakeLists.txt +++ b/channels/rdpsnd/client/pulse/CMakeLists.txt @@ -36,6 +36,4 @@ endif() target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client/Pulse") diff --git a/channels/rdpsnd/client/winmm/CMakeLists.txt b/channels/rdpsnd/client/winmm/CMakeLists.txt index e1515b9ac..43c7257a3 100644 --- a/channels/rdpsnd/client/winmm/CMakeLists.txt +++ b/channels/rdpsnd/client/winmm/CMakeLists.txt @@ -32,7 +32,6 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_PDB_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) endif() diff --git a/channels/rdpsnd/server/CMakeLists.txt b/channels/rdpsnd/server/CMakeLists.txt index 990275f38..62d57be5e 100644 --- a/channels/rdpsnd/server/CMakeLists.txt +++ b/channels/rdpsnd/server/CMakeLists.txt @@ -27,7 +27,5 @@ add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE target_link_libraries(${MODULE_NAME} freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server") diff --git a/channels/remdesk/client/CMakeLists.txt b/channels/remdesk/client/CMakeLists.txt index 744e3ec12..1c289b9d8 100644 --- a/channels/remdesk/client/CMakeLists.txt +++ b/channels/remdesk/client/CMakeLists.txt @@ -27,7 +27,5 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/remdesk/server/CMakeLists.txt b/channels/remdesk/server/CMakeLists.txt index cdcbbabac..dc59a1129 100644 --- a/channels/remdesk/server/CMakeLists.txt +++ b/channels/remdesk/server/CMakeLists.txt @@ -23,13 +23,9 @@ set(${MODULE_PREFIX}_SRCS add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntry") - - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server") diff --git a/channels/serial/client/CMakeLists.txt b/channels/serial/client/CMakeLists.txt index 8611755ef..086e1419e 100644 --- a/channels/serial/client/CMakeLists.txt +++ b/channels/serial/client/CMakeLists.txt @@ -26,7 +26,6 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE target_link_libraries(${MODULE_NAME} winpr freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) diff --git a/channels/server/channels.c b/channels/server/channels.c index cb312c849..84ccf6e15 100644 --- a/channels/server/channels.c +++ b/channels/server/channels.c @@ -47,6 +47,8 @@ #include #include #include +#include +#include void freerdp_channels_dummy() { @@ -70,6 +72,13 @@ void freerdp_channels_dummy() rdpei_server_context_new(NULL); rdpei_server_context_free(NULL); + + remdesk_server_context_new(NULL); + remdesk_server_context_free(NULL); + + encomsp_server_context_new(NULL); + encomsp_server_context_free(NULL); + } /** diff --git a/channels/smartcard/client/CMakeLists.txt b/channels/smartcard/client/CMakeLists.txt index dc25a6c43..1af49ef87 100644 --- a/channels/smartcard/client/CMakeLists.txt +++ b/channels/smartcard/client/CMakeLists.txt @@ -30,7 +30,5 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE target_link_libraries(${MODULE_NAME} winpr freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/tsmf/client/CMakeLists.txt b/channels/tsmf/client/CMakeLists.txt index b13b29187..24866029c 100644 --- a/channels/tsmf/client/CMakeLists.txt +++ b/channels/tsmf/client/CMakeLists.txt @@ -42,8 +42,6 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE target_link_libraries(${MODULE_NAME} freerdp) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) endif() diff --git a/channels/tsmf/client/alsa/CMakeLists.txt b/channels/tsmf/client/alsa/CMakeLists.txt index 0466de04c..f1d5292dc 100644 --- a/channels/tsmf/client/alsa/CMakeLists.txt +++ b/channels/tsmf/client/alsa/CMakeLists.txt @@ -28,5 +28,3 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N target_link_libraries(${MODULE_NAME} freerdp ${ALSA_LIBRARIES}) - -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/tsmf/client/ffmpeg/CMakeLists.txt b/channels/tsmf/client/ffmpeg/CMakeLists.txt index 7f9131bc4..e18e0b3e2 100644 --- a/channels/tsmf/client/ffmpeg/CMakeLists.txt +++ b/channels/tsmf/client/ffmpeg/CMakeLists.txt @@ -39,7 +39,6 @@ else() target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) endif() -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) endif() diff --git a/channels/tsmf/client/gstreamer/CMakeLists.txt b/channels/tsmf/client/gstreamer/CMakeLists.txt index 06347ffda..8557f6e09 100644 --- a/channels/tsmf/client/gstreamer/CMakeLists.txt +++ b/channels/tsmf/client/gstreamer/CMakeLists.txt @@ -63,9 +63,3 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N target_link_libraries(${MODULE_NAME} ${LIBS} freerdp) - -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) -if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) - install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) -endif() - diff --git a/channels/tsmf/client/oss/CMakeLists.txt b/channels/tsmf/client/oss/CMakeLists.txt index b0d39b6a9..4137f437b 100644 --- a/channels/tsmf/client/oss/CMakeLists.txt +++ b/channels/tsmf/client/oss/CMakeLists.txt @@ -28,5 +28,3 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N target_link_libraries(${MODULE_NAME} freerdp ${OSS_LIBRARIES}) - -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/tsmf/client/pulse/CMakeLists.txt b/channels/tsmf/client/pulse/CMakeLists.txt index a93854a53..ab8a5ac4b 100644 --- a/channels/tsmf/client/pulse/CMakeLists.txt +++ b/channels/tsmf/client/pulse/CMakeLists.txt @@ -28,5 +28,3 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N target_link_libraries(${MODULE_NAME} freerdp) - -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/urbdrc/client/CMakeLists.txt b/channels/urbdrc/client/CMakeLists.txt index 7694c4303..5b2a831c0 100644 --- a/channels/urbdrc/client/CMakeLists.txt +++ b/channels/urbdrc/client/CMakeLists.txt @@ -48,8 +48,6 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) endif() diff --git a/channels/urbdrc/client/libusb/CMakeLists.txt b/channels/urbdrc/client/libusb/CMakeLists.txt index c9db8d65f..84a857d07 100644 --- a/channels/urbdrc/client/libusb/CMakeLists.txt +++ b/channels/urbdrc/client/libusb/CMakeLists.txt @@ -44,8 +44,6 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) - if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols) endif() diff --git a/client/.gitignore b/client/.gitignore index e40f517bf..9ad5b74c0 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -9,3 +9,4 @@ !/X11 !/Wayland !/CMakeLists.txt +!*.in diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 37a811db2..1e5c77223 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -83,3 +83,24 @@ if(WITH_CLIENT) endforeach() endif() +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp-client.pc.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp-client${FREERDP_VERSION_MAJOR}.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp-client${FREERDP_VERSION_MAJOR}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +if(${CMAKE_VERSION} VERSION_GREATER "2.8.10") + + export(PACKAGE freerdp-client) + + set(FREERDP_CLIENT_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/FreeRDP-Client${FREERDP_VERSION_MAJOR}") + + configure_package_config_file(FreeRDP-ClientConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ClientConfig.cmake + INSTALL_DESTINATION ${FREERDP_CLIENT_CMAKE_INSTALL_DIR} + PATH_VARS FREERDP_INCLUDE_DIR) + + write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ClientConfigVersion.cmake + VERSION ${FREERDP_VERSION} COMPATIBILITY SameMajorVersion) + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ClientConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ClientConfigVersion.cmake + DESTINATION ${FREERDP_CLIENT_CMAKE_INSTALL_DIR}) + + install(EXPORT FreeRDP-ClientTargets DESTINATION ${FREERDP_CLIENT_CMAKE_INSTALL_DIR}) + +endif() diff --git a/client/FreeRDP-ClientConfig.cmake.in b/client/FreeRDP-ClientConfig.cmake.in new file mode 100644 index 000000000..ba3b8d192 --- /dev/null +++ b/client/FreeRDP-ClientConfig.cmake.in @@ -0,0 +1,10 @@ + +@PACKAGE_INIT@ + +set(FreeRDP_VERSION_MAJOR "@FREERDP_VERSION_MAJOR@") +set(FreeRDP_VERSION_MINOR "@FREERDP_VERSION_MINOR@") +set(FreeRDP_VERSION_REVISION "@FREERDP_VERSION_REVISION@") + +set_and_check(FreeRDP_INCLUDE_DIR "@PACKAGE_FREERDP_INCLUDE_DIR@") + +include("${CMAKE_CURRENT_LIST_DIR}/FreeRDP-ClientTargets.cmake") diff --git a/client/Windows/CMakeLists.txt b/client/Windows/CMakeLists.txt index d2d513f7d..aab5cecf1 100644 --- a/client/Windows/CMakeLists.txt +++ b/client/Windows/CMakeLists.txt @@ -79,7 +79,7 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) if(WITH_CLIENT_INTERFACE) - install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT FreeRDPTargets) + install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_PDB_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT symbols) endif() diff --git a/client/X11/CMakeLists.txt b/client/X11/CMakeLists.txt index 3c0b1c68f..f65817f89 100644 --- a/client/X11/CMakeLists.txt +++ b/client/X11/CMakeLists.txt @@ -74,7 +74,7 @@ set(${MODULE_PREFIX}_LIBS ${CMAKE_DL_LIBS}) if(WITH_MANPAGES) - find_program( XSLTPROC_EXECUTABLE NAMES xsltproc) + find_program(XSLTPROC_EXECUTABLE NAMES xsltproc) if(DOCBOOKXSL_FOUND AND XSLTPROC_EXECUTABLE) @@ -211,7 +211,7 @@ if(WITH_IPP) endif() if(WITH_CLIENT_INTERFACE) - install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT FreeRDPTargets) + install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) add_subdirectory(cli) else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT client) diff --git a/client/common/CMakeLists.txt b/client/common/CMakeLists.txt index 747b2f2ce..5502696d9 100644 --- a/client/common/CMakeLists.txt +++ b/client/common/CMakeLists.txt @@ -67,22 +67,20 @@ if (WITH_LIBRARY_VERSIONING) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) endif() - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} - ${FREERDP_CHANNELS_CLIENT_LIBS}) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES}) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) +target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${FREERDP_CHANNELS_CLIENT_LIBS}) if(OPENBSD) - target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ossaudio) + target_link_libraries(${MODULE_NAME} ${PUBLIC_KEYWORD} ${${MODULE_PREFIX}_LIBS} ossaudio) else() - target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) + target_link_libraries(${MODULE_NAME} ${PUBLIC_KEYWORD} ${${MODULE_PREFIX}_LIBS}) endif() -install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT FreeRDPTargets) + +install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT FreeRDP-ClientTargets) if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_PDB_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT symbols) diff --git a/client/freerdp-client.pc.in b/client/freerdp-client.pc.in new file mode 100644 index 000000000..5013a5f0a --- /dev/null +++ b/client/freerdp-client.pc.in @@ -0,0 +1,15 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=@CMAKE_INSTALL_PREFIX@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=${prefix}@FREERDP_INCLUDE_DIR@ +libs=-lfreerdp-client + +Name: FreeRDP client +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@ +Libs: -L${libdir} ${libs} +Libs.private: -ldl -lpthread +Cflags: -I${includedir} diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 8995688e3..a020dc534 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -19,18 +19,19 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp/version.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp/build-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp/build-config.h) +set(FREERDP_INSTALL_INCLUDE_DIR include/freerdp${FREERDP_VERSION_MAJOR}/freerdp) file(GLOB FREERDP_HEADERS "freerdp/*.h") -install(FILES ${FREERDP_HEADERS} DESTINATION include/freerdp COMPONENT headers) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp/version.h DESTINATION include/freerdp COMPONENT headers) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp/build-config.h DESTINATION include/freerdp COMPONENT headers) +install(FILES ${FREERDP_HEADERS} DESTINATION ${FREERDP_INSTALL_INCLUDE_DIR} COMPONENT headers) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp/version.h DESTINATION ${FREERDP_INSTALL_INCLUDE_DIR} COMPONENT headers) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp/build-config.h DESTINATION ${FREERDP_INSTALL_INCLUDE_DIR} COMPONENT headers) -install(DIRECTORY freerdp/cache DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h") -install(DIRECTORY freerdp/codec DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h") -install(DIRECTORY freerdp/crypto DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h") -install(DIRECTORY freerdp/gdi DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h") -install(DIRECTORY freerdp/locale DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h") -install(DIRECTORY freerdp/utils DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h") -install(DIRECTORY freerdp/client DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h") -install(DIRECTORY freerdp/server DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h") -install(DIRECTORY freerdp/channels DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h") +install(DIRECTORY freerdp/cache DESTINATION ${FREERDP_INSTALL_INCLUDE_DIR} COMPONENT headers FILES_MATCHING PATTERN "*.h") +install(DIRECTORY freerdp/codec DESTINATION ${FREERDP_INSTALL_INCLUDE_DIR} COMPONENT headers FILES_MATCHING PATTERN "*.h") +install(DIRECTORY freerdp/crypto DESTINATION ${FREERDP_INSTALL_INCLUDE_DIR} COMPONENT headers FILES_MATCHING PATTERN "*.h") +install(DIRECTORY freerdp/gdi DESTINATION ${FREERDP_INSTALL_INCLUDE_DIR} COMPONENT headers FILES_MATCHING PATTERN "*.h") +install(DIRECTORY freerdp/locale DESTINATION ${FREERDP_INSTALL_INCLUDE_DIR} COMPONENT headers FILES_MATCHING PATTERN "*.h") +install(DIRECTORY freerdp/utils DESTINATION ${FREERDP_INSTALL_INCLUDE_DIR} COMPONENT headers FILES_MATCHING PATTERN "*.h") +install(DIRECTORY freerdp/client DESTINATION ${FREERDP_INSTALL_INCLUDE_DIR} COMPONENT headers FILES_MATCHING PATTERN "*.h") +install(DIRECTORY freerdp/server DESTINATION ${FREERDP_INSTALL_INCLUDE_DIR} COMPONENT headers FILES_MATCHING PATTERN "*.h") +install(DIRECTORY freerdp/channels DESTINATION ${FREERDP_INSTALL_INCLUDE_DIR} COMPONENT headers FILES_MATCHING PATTERN "*.h") diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt index 675d6b663..41159a56c 100644 --- a/libfreerdp/CMakeLists.txt +++ b/libfreerdp/CMakeLists.txt @@ -313,3 +313,27 @@ if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS) endif() set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp${FREERDP_VERSION_MAJOR}.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp${FREERDP_VERSION_MAJOR}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + +## cmake project +if(${CMAKE_VERSION} VERSION_GREATER "2.8.10") + + export(PACKAGE freerdp) + + set(FREERDP_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/FreeRDP${FREERDP_VERSION_MAJOR}") + + configure_package_config_file(FreeRDPConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FreeRDPConfig.cmake + INSTALL_DESTINATION ${FREERDP_CMAKE_INSTALL_DIR} + PATH_VARS FREERDP_INCLUDE_DIR) + + write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FreeRDPConfigVersion.cmake + VERSION ${FREERDP_VERSION} COMPATIBILITY SameMajorVersion) + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FreeRDPConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FreeRDPConfigVersion.cmake + DESTINATION ${FREERDP_CMAKE_INSTALL_DIR}) + + install(EXPORT FreeRDPTargets DESTINATION ${FREERDP_CMAKE_INSTALL_DIR}) + +endif() diff --git a/FreeRDPConfig.cmake.in b/libfreerdp/FreeRDPConfig.cmake.in similarity index 100% rename from FreeRDPConfig.cmake.in rename to libfreerdp/FreeRDPConfig.cmake.in diff --git a/freerdp.pc.in b/libfreerdp/freerdp.pc.in similarity index 68% rename from freerdp.pc.in rename to libfreerdp/freerdp.pc.in index ca0d63cbb..456b284fd 100644 --- a/freerdp.pc.in +++ b/libfreerdp/freerdp.pc.in @@ -1,15 +1,15 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=@CMAKE_INSTALL_PREFIX@ libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_PREFIX@/include -libs=@FREERDP_PC_LIBS@ +includedir=${prefix}/@FREERDP_INCLUDE_DIR@ +libs=-lfreerdp Name: FreeRDP Description: FreeRDP: A Remote Desktop Protocol Implementation URL: http://www.freerdp.com/ -Version: @FREERDP_VERSION_FULL@ +Version: @FREERDP_VERSION@ Requires: -Requires.private: winpr zlib libssl +Requires.private: @WINPR_PKG_CONFIG_FILENAME@ libssl Libs: -L${libdir} ${libs} Libs.private: -ldl -lpthread Cflags: -I${includedir} diff --git a/rdtk/CMakeLists.txt b/rdtk/CMakeLists.txt index 73c64facd..287f210a0 100644 --- a/rdtk/CMakeLists.txt +++ b/rdtk/CMakeLists.txt @@ -41,13 +41,12 @@ include(GNUInstallDirsWrapper) include(CMakePackageConfigHelpers) # Soname versioning -set(RDTK_VERSION_MAJOR "1") -set(RDTK_VERSION_MINOR "1") -set(RDTK_VERSION_REVISION "0") +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_VERSION_FULL "${RDTK_VERSION}") -set(RDTK_VERSION_FULL ${RDTK_VERSION_FULL} PARENT_SCOPE) # Default to release build type if(NOT CMAKE_BUILD_TYPE) @@ -74,14 +73,15 @@ if(WITH_SAMPLE) endif() # Exporting +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rdtk.pc.in ${CMAKE_CURRENT_BINARY_DIR}/rdtk${RDTK_VERSION_MAJOR}.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rdtk${RDTK_VERSION_MAJOR}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) if(${CMAKE_VERSION} VERSION_GREATER "2.8.10") - export(PACKAGE rdtk) - set(RDTK_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/RdTk") + set(RDTK_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/RdTk${RDTK_VERSION_MAJOR}") - set(RDTK_INCLUDE_DIR "include") + set(RDTK_INCLUDE_DIR "include/rdtk${RDTK_VERSION_MAJOR}") configure_package_config_file(RdTkConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/RdTkConfig.cmake INSTALL_DESTINATION ${RDTK_CMAKE_INSTALL_DIR} PATH_VARS RDTK_INCLUDE_DIR) diff --git a/rdtk/include/CMakeLists.txt b/rdtk/include/CMakeLists.txt index d35c350de..a363933c0 100644 --- a/rdtk/include/CMakeLists.txt +++ b/rdtk/include/CMakeLists.txt @@ -16,5 +16,5 @@ # limitations under the License. file(GLOB RDTK_HEADERS "rdtk/*.h") -install(FILES ${RDTK_HEADERS} DESTINATION include/rdtk COMPONENT headers) +install(FILES ${RDTK_HEADERS} DESTINATION include/rdtk${RDTK_VERSION_MAJOR}/rdtk COMPONENT headers) diff --git a/rdtk/rdtk.pc.in b/rdtk/rdtk.pc.in new file mode 100644 index 000000000..323916eab --- /dev/null +++ b/rdtk/rdtk.pc.in @@ -0,0 +1,15 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=@CMAKE_INSTALL_PREFIX@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=${prefix}/@RDTK_INCLUDE_DIR@ +libs=-lrdtk + +Name: Remote Desktop Tool Kit +Description: FreeRDP RDTK: A toolkit implementation for RDP +URL: http://www.freerdp.com/ +Version: @RDTK_VERSION_FULL@ +Requires: +Requires.private: @WINPR_PKG_CONFIG_FILENAME@ freerdp@FREERDP_VERSION_MAJOR@ +Libs: -L${libdir} ${libs} +Libs.private: -ldl -lpthread +Cflags: -I${includedir} diff --git a/server/.gitignore b/server/.gitignore index ef902f781..5685908a6 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -6,3 +6,4 @@ !/X11 !/shadow !/CmakeLists.txt +!*.in diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index ee9458e4b..24f7bb182 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -64,3 +64,25 @@ foreach(FREERDP_SERVER ${FREERDP_EXTRA_SERVERS}) add_subdirectory(${FREERDP_SERVER}) endforeach() +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp-server.pc.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp-server${FREERDP_VERSION_MAJOR}.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp-server${FREERDP_VERSION_MAJOR}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + +if(${CMAKE_VERSION} VERSION_GREATER "2.8.10") + + export(PACKAGE freerdp-server) + + set(FREERDP_SERVER_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/FreeRDP-Server${FREERDP_VERSION_MAJOR}") + + configure_package_config_file(FreeRDP-ServerConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ServerConfig.cmake + INSTALL_DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR} + PATH_VARS FREERDP_INCLUDE_DIR) + + write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ServerConfigVersion.cmake + VERSION ${FREERDP_VERSION} COMPATIBILITY SameMajorVersion) + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ServerConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ServerConfigVersion.cmake + DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR}) + + install(EXPORT FreeRDP-ServerTargets DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR}) + +endif() diff --git a/server/FreeRDP-ServerConfig.cmake.in b/server/FreeRDP-ServerConfig.cmake.in new file mode 100644 index 000000000..2f2788bd2 --- /dev/null +++ b/server/FreeRDP-ServerConfig.cmake.in @@ -0,0 +1,10 @@ + +@PACKAGE_INIT@ + +set(FreeRDP_VERSION_MAJOR "@FREERDP_VERSION_MAJOR@") +set(FreeRDP_VERSION_MINOR "@FREERDP_VERSION_MINOR@") +set(FreeRDP_VERSION_REVISION "@FREERDP_VERSION_REVISION@") + +set_and_check(FreeRDP_INCLUDE_DIR "@PACKAGE_FREERDP_INCLUDE_DIR@") + +include("${CMAKE_CURRENT_LIST_DIR}/FreeRDP-ServerTargets.cmake") diff --git a/server/common/CMakeLists.txt b/server/common/CMakeLists.txt index 1f01d0076..d5b990610 100644 --- a/server/common/CMakeLists.txt +++ b/server/common/CMakeLists.txt @@ -18,6 +18,13 @@ set(MODULE_NAME "freerdp-server") set(MODULE_PREFIX "FREERDP_SERVER") +# Policy CMP0022: INTERFACE_LINK_LIBRARIES defines the link +# interface. Run "cmake --help-policy CMP0022" for policy details. Use the +# cmake_policy command to set the policy and suppress this warning. +if(POLICY CMP0022) + cmake_policy(SET CMP0022 NEW) +endif() + set(${MODULE_PREFIX}_SRCS server.c) @@ -29,10 +36,6 @@ if(MSVC) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() -foreach(FREERDP_CHANNELS_SERVER_SRC ${FREERDP_CHANNELS_SERVER_SRCS}) - set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} - "${FREERDP_CHANNELS_SERVER_SRC}") -endforeach() # On windows create dll version information. # Vendor, product and year are already set in top level CMakeLists.txt @@ -56,13 +59,10 @@ if (WITH_LIBRARY_VERSIONING) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) endif() +target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${FREERDP_CHANNELS_SERVER_LIBS}) +target_link_libraries(${MODULE_NAME} ${PUBLIC_KEYWORD} winpr freerdp) -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} - ${FREERDP_CHANNELS_SERVER_LIBS}) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - -install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT FreeRDPTargets) +install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT FreeRDP-ServerTargets) if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS) install(FILES ${CMAKE_PDB_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT symbols) endif() diff --git a/server/freerdp-server.pc.in b/server/freerdp-server.pc.in new file mode 100644 index 000000000..f9ef4c345 --- /dev/null +++ b/server/freerdp-server.pc.in @@ -0,0 +1,15 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=@CMAKE_INSTALL_PREFIX@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=${prefix}/@FREERDP_INCLUDE_DIR@ +libs=-lfreerdp-server + +Name: FreeRDP server +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@ +Libs: -L${libdir} ${libs} +Libs.private: -ldl -lpthread +Cflags: -I${includedir} diff --git a/server/shadow/CMakeLists.txt b/server/shadow/CMakeLists.txt index ce5ac7f79..421d4bd82 100644 --- a/server/shadow/CMakeLists.txt +++ b/server/shadow/CMakeLists.txt @@ -73,8 +73,6 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) list(APPEND ${MODULE_PREFIX}_LIBS freerdp) list(APPEND ${MODULE_PREFIX}_LIBS freerdp-server) -list(APPEND ${MODULE_PREFIX}_LIBS freerdp-client) - list(APPEND ${MODULE_PREFIX}_LIBS winpr) list(APPEND ${MODULE_PREFIX}_LIBS winpr-makecert-tool) diff --git a/third-party/.gitignore b/third-party/.gitignore index efc4279f7..bbf8a76fc 100644 --- a/third-party/.gitignore +++ b/third-party/.gitignore @@ -1,4 +1,5 @@ * **/* !CMakeLists.txt +!*.pc.in diff --git a/winpr/.gitignore b/winpr/.gitignore index 68936e807..c2fee8dd4 100644 --- a/winpr/.gitignore +++ b/winpr/.gitignore @@ -1,3 +1,2 @@ tools/hash/winpr-hash tools/reg/winpr-reg - diff --git a/winpr/CMakeLists.txt b/winpr/CMakeLists.txt index 1021d164e..96962f215 100644 --- a/winpr/CMakeLists.txt +++ b/winpr/CMakeLists.txt @@ -51,11 +51,12 @@ include(CMakePackageConfigHelpers) set(WINPR_VERSION_MAJOR "1") set(WINPR_VERSION_MINOR "1") set(WINPR_VERSION_REVISION "0") -set(WINPR_VERSION "${WINPR_VERSION_MAJOR}.${WINPR_VERSION_MINOR}") -set(WINPR_VERSION_FULL "${WINPR_VERSION}.${WINPR_VERSION_REVISION}") +set(WINPR_VERSION "${WINPR_VERSION_MAJOR}.${WINPR_VERSION_MINOR}.${WINPR_VERSION_REVISION}") +set(WINPR_VERSION_FULL "${WINPR_VERSION}") if(FREERDP_BUILD) set(WINPR_VERSION_FULL ${WINPR_VERSION_FULL} PARENT_SCOPE) + set(WINPR_VERSION_FULL ${WINPR_VERSION} PARENT_SCOPE) else() set(CMAKE_THREAD_PREFER_PTHREAD TRUE) @@ -161,9 +162,9 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10") export(PACKAGE winpr) - set(WINPR_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/WinPR") + set(WINPR_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/WinPR${WINPR_VERSION_MAJOR}") - set(WINPR_INCLUDE_DIR "include") + set(WINPR_INCLUDE_DIR "include/winpr${WINPR_VERSION_MAJOR}") configure_package_config_file(WinPRConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/WinPRConfig.cmake INSTALL_DESTINATION ${WINPR_CMAKE_INSTALL_DIR} @@ -179,3 +180,6 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10") endif() +set(WINPR_PKG_CONFIG_FILENAME winpr${WINPR_VERSION_MAJOR} PARENT_SCOPE) +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/include/CMakeLists.txt b/winpr/include/CMakeLists.txt index 1121008ad..928f88f18 100644 --- a/winpr/include/CMakeLists.txt +++ b/winpr/include/CMakeLists.txt @@ -17,7 +17,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/winpr/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/winpr/version.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/winpr/wtypes.h.in ${CMAKE_CURRENT_BINARY_DIR}/winpr/wtypes.h) +set(WINPR_INSTALL_INCLUDE_DIR include/winpr${WINPR_VERSION_MAJOR}/winpr) file(GLOB WINPR_HEADERS "winpr/*.h") -install(FILES ${WINPR_HEADERS} DESTINATION include/winpr COMPONENT headers) -install(DIRECTORY winpr/tools DESTINATION include/winpr COMPONENT headers FILES_MATCHING PATTERN "*.h") +install(FILES ${WINPR_HEADERS} DESTINATION ${WINPR_INSTALL_INCLUDE_DIR} COMPONENT headers) +install(DIRECTORY winpr/tools DESTINATION ${WINPR_INSTALL_INCLUDE_DIR} COMPONENT headers FILES_MATCHING PATTERN "*.h") diff --git a/winpr.pc.in b/winpr/winpr.pc.in similarity index 74% rename from winpr.pc.in rename to winpr/winpr.pc.in index 5be9979f6..58dc08afa 100644 --- a/winpr.pc.in +++ b/winpr/winpr.pc.in @@ -1,14 +1,14 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=@CMAKE_INSTALL_PREFIX@ libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_PREFIX@/include -libs=@WINPR_PC_LIBS@ +includedir=${libdir}/@WINPR_INCLUDE_DIR@ +libs=-lwinpr Name: WinPR Description: WinPR: Windows Portable Runtime URL: http://www.freerdp.com/ -Version: @WINPR_VERSION_FULL@ -Requires: +Version: @WINPR_VERSION@ +Requires: Requires.private: zlib libssl Libs: -L${libdir} ${libs} Libs.private: -ldl -lrt -lm -lpthread From 7c03db342ca5602e2a4e58255077320eff6e9c35 Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Mon, 11 Jan 2016 16:18:40 +0100 Subject: [PATCH 4/4] add parameter buildconfig Extend winpr and client/common to support a new option "/buildconfig". When used build the following build specific information is print: * cmake options * cflags * compiler * target architecture * cmake build type --- .gitignore | 1 + CMakeLists.txt | 10 ++++++++++ buildflags.h.in | 11 +++++++++++ client/common/cmdline.c | 18 ++++++++++++++++++ winpr/include/winpr/cmdline.h | 2 ++ winpr/libwinpr/utils/cmdline.c | 2 ++ 6 files changed, 44 insertions(+) create mode 100644 buildflags.h.in diff --git a/.gitignore b/.gitignore index 6853f6825..34ff16e31 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ LICENSE.txt *ConfigVersion.cmake include/freerdp/version.h include/freerdp/build-config.h +buildflags.h *.a.objlist.cmake *.a.objlist diff --git a/CMakeLists.txt b/CMakeLists.txt index 68ff44e06..d15c6bf88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -819,3 +819,13 @@ endif() #message("VENDOR: ${VENDOR} CLIENT_VENDOR_PATH: ${CLIENT_VENDOR_PATH} CMAKE_CPACK_INCLUDE_FILE: ${CMAKE_CPACK_INCLUDE_FILE}") include(${CMAKE_CPACK_INCLUDE_FILE}) + +set(FREERDP_BUILD_CONFIG_LIST "") +GET_CMAKE_PROPERTY(res VARIABLES) +FOREACH(var ${res}) + IF (var MATCHES "^WITH_*|^BUILD_TESTING|^STATIC_CHANNELS|^HAVE_*") + LIST(APPEND FREERDP_BUILD_CONFIG_LIST "${var}=${${var}}") + ENDIF() +ENDFOREACH() +string(REPLACE ";" " " FREERDP_BUILD_CONFIG "${FREERDP_BUILD_CONFIG_LIST}") +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/buildflags.h.in ${CMAKE_CURRENT_BINARY_DIR}/buildflags.h) diff --git a/buildflags.h.in b/buildflags.h.in new file mode 100644 index 000000000..0b8b31092 --- /dev/null +++ b/buildflags.h.in @@ -0,0 +1,11 @@ +#ifndef _FREERDP_BUILD_FLAGS_H +#define _FREERDP_BUILD_FLAGS_H + +#define CFLAGS "${CMAKE_C_FLAGS}" +#define COMPILER_ID "${CMAKE_C_COMPILER_ID}" +#define COMPILER_VERSION "${CMAKE_C_COMPILER_VERSION}" +#define TARGET_ARCH "${TARGET_ARCH}" +#define BUILD_CONFIG "${FREERDP_BUILD_CONFIG}" +#define BUILD_TYPE "${CMAKE_BUILD_TYPE}" + +#endif /*_FREERDP_BUILD_FLAGS_H */ diff --git a/client/common/cmdline.c b/client/common/cmdline.c index 91f362ddd..517ee0e06 100644 --- a/client/common/cmdline.c +++ b/client/common/cmdline.c @@ -21,6 +21,7 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include "buildflags.h" #include @@ -171,6 +172,7 @@ static COMMAND_LINE_ARGUMENT_A args[] = { "assistance", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "Remote assistance password" }, { "encryption-methods", COMMAND_LINE_VALUE_REQUIRED, "<40,56,128,FIPS>", NULL, NULL, -1, NULL, "RDP standard security encryption methods" }, { "from-stdin", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "Read credentials from stdin, do not use defaults." }, + { "buildconfig", COMMAND_LINE_VALUE_FLAG | COMMAND_LINE_PRINT_BUILDCONFIG, NULL, NULL, NULL, -1, NULL, "print the build configuration" }, { NULL, 0, NULL, NULL, NULL, -1, NULL, NULL } }; @@ -180,6 +182,16 @@ int freerdp_client_print_version() return 1; } +int freerdp_client_print_buildconfig() +{ + printf("Build configuration: %s\n", BUILD_CONFIG); + printf("Build type: %s\n", BUILD_TYPE); + printf("CFLAGS: %s\n", CFLAGS); + printf("Compiler: %s, %s\n", COMPILER_ID, COMPILER_VERSION); + printf("Target architecture: %s\n", TARGET_ARCH); + return 1; +} + int freerdp_client_print_command_line_help(int argc, char** argv) { char* str; @@ -1352,6 +1364,12 @@ int freerdp_client_settings_command_line_status_print(rdpSettings* settings, int freerdp_client_print_version(); return COMMAND_LINE_STATUS_PRINT_VERSION; } + if (status == COMMAND_LINE_STATUS_PRINT_BUILDCONFIG) + { + freerdp_client_print_version(); + freerdp_client_print_buildconfig(); + return COMMAND_LINE_STATUS_PRINT_BUILDCONFIG; + } else if (status == COMMAND_LINE_STATUS_PRINT) { arg = CommandLineFindArgumentA(args, "kbd-list"); diff --git a/winpr/include/winpr/cmdline.h b/winpr/include/winpr/cmdline.h index ef41a6be8..b843ee7eb 100644 --- a/winpr/include/winpr/cmdline.h +++ b/winpr/include/winpr/cmdline.h @@ -39,6 +39,7 @@ #define COMMAND_LINE_PRINT 0x00000200 #define COMMAND_LINE_PRINT_HELP 0x00000400 #define COMMAND_LINE_PRINT_VERSION 0x00000800 +#define COMMAND_LINE_PRINT_BUILDCONFIG 0x00001000 /* Command-Line Argument Output Flags */ @@ -78,6 +79,7 @@ #define COMMAND_LINE_STATUS_PRINT -2001 #define COMMAND_LINE_STATUS_PRINT_HELP -2002 #define COMMAND_LINE_STATUS_PRINT_VERSION -2003 +#define COMMAND_LINE_STATUS_PRINT_BUILDCONFIG -2004 /* Command-Line Macros */ diff --git a/winpr/libwinpr/utils/cmdline.c b/winpr/libwinpr/utils/cmdline.c index e55b738f1..cc22d5de7 100644 --- a/winpr/libwinpr/utils/cmdline.c +++ b/winpr/libwinpr/utils/cmdline.c @@ -363,6 +363,8 @@ int CommandLineParseArgumentsA(int argc, LPCSTR* argv, COMMAND_LINE_ARGUMENT_A* return COMMAND_LINE_STATUS_PRINT_HELP; else if (options[j].Flags & COMMAND_LINE_PRINT_VERSION) return COMMAND_LINE_STATUS_PRINT_VERSION; + else if (options[j].Flags & COMMAND_LINE_PRINT_BUILDCONFIG) + return COMMAND_LINE_STATUS_PRINT_BUILDCONFIG; } if (!found && (flags & COMMAND_LINE_IGN_UNKNOWN_KEYWORD) == 0)