From 0313ca3622baec53425b749e65caa202015894de Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Fri, 12 Sep 2014 00:19:53 +0200 Subject: [PATCH] libfreerdp: always build "MONOLITHIC" "libfreerdp" consisted of multiple (small) single libraries. If the cmake option MONOLITHIC was used only one library was build combining all of the libfreerdp-* libraries. The only exceptions to this are libfreerdp-server and libfreerdp-client these are build as separate libraries. This commit obsoltes non-monolithic builds and makes monolithic builds the default. The cmake option MONOLITHIC is also removed. --- CMakeLists.txt | 31 +- channels/audin/client/CMakeLists.txt | 7 +- channels/audin/client/alsa/CMakeLists.txt | 7 +- channels/audin/client/opensles/CMakeLists.txt | 9 +- channels/audin/client/pulse/CMakeLists.txt | 7 +- channels/audin/client/winmm/CMakeLists.txt | 7 +- channels/audin/server/CMakeLists.txt | 7 +- channels/client/CMakeLists.txt | 8 +- channels/cliprdr/client/CMakeLists.txt | 7 +- channels/cliprdr/server/CMakeLists.txt | 7 +- channels/disp/client/CMakeLists.txt | 7 +- channels/drdynvc/client/CMakeLists.txt | 7 - channels/drdynvc/server/CMakeLists.txt | 7 +- channels/drive/client/CMakeLists.txt | 9 +- channels/echo/client/CMakeLists.txt | 7 +- channels/echo/server/CMakeLists.txt | 7 +- channels/parallel/client/CMakeLists.txt | 9 +- channels/printer/client/CMakeLists.txt | 7 +- channels/rail/client/CMakeLists.txt | 7 +- channels/rdpdr/client/CMakeLists.txt | 9 +- channels/rdpdr/server/CMakeLists.txt | 7 +- channels/rdpei/client/CMakeLists.txt | 9 +- channels/rdpgfx/client/CMakeLists.txt | 9 +- channels/rdpsnd/client/CMakeLists.txt | 9 +- channels/rdpsnd/client/alsa/CMakeLists.txt | 7 +- channels/rdpsnd/client/ios/CMakeLists.txt | 7 +- channels/rdpsnd/client/mac/CMakeLists.txt | 7 +- .../rdpsnd/client/opensles/CMakeLists.txt | 8 +- channels/rdpsnd/client/pulse/CMakeLists.txt | 6 +- channels/rdpsnd/client/winmm/CMakeLists.txt | 7 +- channels/rdpsnd/server/CMakeLists.txt | 7 +- channels/remdesk/client/CMakeLists.txt | 7 +- channels/serial/client/CMakeLists.txt | 9 +- channels/server/CMakeLists.txt | 8 +- channels/smartcard/client/CMakeLists.txt | 9 +- channels/tsmf/client/CMakeLists.txt | 7 +- channels/tsmf/client/alsa/CMakeLists.txt | 9 +- channels/tsmf/client/ffmpeg/CMakeLists.txt | 7 +- channels/tsmf/client/gstreamer/CMakeLists.txt | 10 +- channels/tsmf/client/pulse/CMakeLists.txt | 9 +- channels/urbdrc/client/CMakeLists.txt | 7 +- client/Android/FreeRDPCore/jni/CMakeLists.txt | 8 +- client/DirectFB/CMakeLists.txt | 8 +- client/Mac/CMakeLists.txt | 7 +- client/Sample/CMakeLists.txt | 9 +- client/Windows/CMakeLists.txt | 10 +- client/X11/CMakeLists.txt | 16 +- client/common/CMakeLists.txt | 6 +- client/iOS/CMakeLists.txt | 6 +- cmake/CheckCmakeCompat.cmake | 7 - cmake/ConfigOptions.cmake | 8 - libfreerdp/CMakeLists.txt | 265 ++++++++++++++++-- libfreerdp/cache/CMakeLists.txt | 25 +- libfreerdp/codec/CMakeLists.txt | 139 --------- libfreerdp/codec/test/CMakeLists.txt | 7 +- libfreerdp/common/CMakeLists.txt | 28 +- libfreerdp/common/test/CMakeLists.txt | 7 +- libfreerdp/core/CMakeLists.txt | 39 +-- libfreerdp/crypto/CMakeLists.txt | 39 +-- libfreerdp/crypto/test/CMakeLists.txt | 7 +- libfreerdp/dummy.c | 5 - libfreerdp/gdi/CMakeLists.txt | 24 +- libfreerdp/gdi/test/CMakeLists.txt | 11 +- libfreerdp/locale/CMakeLists.txt | 40 +-- libfreerdp/primitives/CMakeLists.txt | 112 -------- libfreerdp/primitives/test/CMakeLists.txt | 7 +- .../primitives/test/TestPrimitivesYCoCg.c | 2 +- libfreerdp/rail/CMakeLists.txt | 26 +- libfreerdp/utils/CMakeLists.txt | 31 +- libfreerdp/utils/test/CMakeLists.txt | 9 +- server/Mac/CMakeLists.txt | 7 +- server/Sample/CMakeLists.txt | 8 +- server/Windows/CMakeLists.txt | 7 +- server/shadow/CMakeLists.txt | 7 +- 74 files changed, 342 insertions(+), 933 deletions(-) delete mode 100644 libfreerdp/codec/CMakeLists.txt delete mode 100644 libfreerdp/dummy.c delete mode 100644 libfreerdp/primitives/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index a50723f86..6c98e76f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -649,7 +649,9 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10") set(FREERDP_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/FreeRDP") set(FREERDP_INCLUDE_DIR "include") - set(FREERDP_MONOLITHIC_BUILD ${MONOLITHIC_BUILD}) + + # 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} @@ -681,28 +683,11 @@ endif() include(${CMAKE_CPACK_INCLUDE_FILE}) -if(MONOLITHIC_BUILD) - 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() -else(MONOLITHIC_BUILD) - # freerdp exports - get_property(MEXPORTS GLOBAL PROPERTY "freerdp_EXPORTS") - foreach(EXPORT_MODULE ${MEXPORTS}) - list(APPEND FREERDP_PC_LIBS "-lfreerdp-${EXPORT_MODULE}") - endforeach() - string(REPLACE ";" " " FREERDP_PC_LIBS "${FREERDP_PC_LIBS}") - - # winpr exports - get_property(MEXPORTS GLOBAL PROPERTY "winpr_EXPORTS") - foreach(EXPORT_MODULE ${MEXPORTS}) - list(APPEND WINPR_PC_LIBS "-lwinpr-${EXPORT_MODULE}") - endforeach() - list(APPEND WINPR_PC_LIBS "-lwinpr") - string(REPLACE ";" " " WINPR_PC_LIBS "${WINPR_PC_LIBS}") -endif(MONOLITHIC_BUILD) +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) diff --git a/channels/audin/client/CMakeLists.txt b/channels/audin/client/CMakeLists.txt index e126eab0d..52b73e12e 100644 --- a/channels/audin/client/CMakeLists.txt +++ b/channels/audin/client/CMakeLists.txt @@ -27,12 +27,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-common freerdp-utils) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/audin/client/alsa/CMakeLists.txt b/channels/audin/client/alsa/CMakeLists.txt index e5d1dfaf1..892a263d2 100644 --- a/channels/audin/client/alsa/CMakeLists.txt +++ b/channels/audin/client/alsa/CMakeLists.txt @@ -27,12 +27,7 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-codec freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ALSA_LIBRARIES}) +set(${MODULE_PREFIX}_LIBS freerdp ${ALSA_LIBRARIES}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/channels/audin/client/opensles/CMakeLists.txt b/channels/audin/client/opensles/CMakeLists.txt index ff872e69d..cd34e712b 100644 --- a/channels/audin/client/opensles/CMakeLists.txt +++ b/channels/audin/client/opensles/CMakeLists.txt @@ -28,14 +28,7 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-codec freerdp-utils - ${OPENSLES_LIBRARIES} - ) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${OPENSLES_LIBRARIES}) +set(${MODULE_PREFIX}_LIBS freerdp ${OPENSLES_LIBRARIES}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/channels/audin/client/pulse/CMakeLists.txt b/channels/audin/client/pulse/CMakeLists.txt index f0ddd34a2..bdbaa5b5f 100644 --- a/channels/audin/client/pulse/CMakeLists.txt +++ b/channels/audin/client/pulse/CMakeLists.txt @@ -27,12 +27,7 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-codec freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${PULSE_LIBRARY}) +set(${MODULE_PREFIX}_LIBS freerdp ${PULSE_LIBRARY}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/channels/audin/client/winmm/CMakeLists.txt b/channels/audin/client/winmm/CMakeLists.txt index 10db102ad..f4adaddc7 100644 --- a/channels/audin/client/winmm/CMakeLists.txt +++ b/channels/audin/client/winmm/CMakeLists.txt @@ -26,12 +26,7 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winmm.lib) +set(${MODULE_PREFIX}_LIBS freerdp winmm.lib) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/channels/audin/server/CMakeLists.txt b/channels/audin/server/CMakeLists.txt index e23d33192..c093ec538 100644 --- a/channels/audin/server/CMakeLists.txt +++ b/channels/audin/server/CMakeLists.txt @@ -24,12 +24,7 @@ add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-codec freerdp-utils) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/client/CMakeLists.txt b/channels/client/CMakeLists.txt index 6b8aaf2c3..049bc7b0c 100644 --- a/channels/client/CMakeLists.txt +++ b/channels/client/CMakeLists.txt @@ -96,13 +96,7 @@ set(CLIENT_STATIC_ADDIN_TABLE "${CLIENT_STATIC_ADDIN_TABLE}\n\t{ NULL, NULL, NUL configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tables.c.in ${CMAKE_CURRENT_BINARY_DIR}/tables.c) -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp winpr) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} PARENT_SCOPE) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) diff --git a/channels/cliprdr/client/CMakeLists.txt b/channels/cliprdr/client/CMakeLists.txt index f2f3c32ea..e23861515 100644 --- a/channels/cliprdr/client/CMakeLists.txt +++ b/channels/cliprdr/client/CMakeLists.txt @@ -27,12 +27,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +set(${MODULE_PREFIX}_LIBS freerdp winpr) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/cliprdr/server/CMakeLists.txt b/channels/cliprdr/server/CMakeLists.txt index 5abc3d511..0375f6d53 100644 --- a/channels/cliprdr/server/CMakeLists.txt +++ b/channels/cliprdr/server/CMakeLists.txt @@ -25,12 +25,7 @@ add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/disp/client/CMakeLists.txt b/channels/disp/client/CMakeLists.txt index 377e65153..328dc3cb6 100644 --- a/channels/disp/client/CMakeLists.txt +++ b/channels/disp/client/CMakeLists.txt @@ -27,12 +27,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-common freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/channels/drdynvc/client/CMakeLists.txt b/channels/drdynvc/client/CMakeLists.txt index d8e3d02cd..27e45a547 100644 --- a/channels/drdynvc/client/CMakeLists.txt +++ b/channels/drdynvc/client/CMakeLists.txt @@ -28,13 +28,6 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - -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/drdynvc/server/CMakeLists.txt b/channels/drdynvc/server/CMakeLists.txt index f31e55815..4e09ba49d 100644 --- a/channels/drdynvc/server/CMakeLists.txt +++ b/channels/drdynvc/server/CMakeLists.txt @@ -25,12 +25,7 @@ add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/drive/client/CMakeLists.txt b/channels/drive/client/CMakeLists.txt index 82bbc70f7..eb09d1a91 100644 --- a/channels/drive/client/CMakeLists.txt +++ b/channels/drive/client/CMakeLists.txt @@ -33,14 +33,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} winpr freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/echo/client/CMakeLists.txt b/channels/echo/client/CMakeLists.txt index 54417f093..47ac1bf8d 100644 --- a/channels/echo/client/CMakeLists.txt +++ b/channels/echo/client/CMakeLists.txt @@ -27,12 +27,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-common freerdp-utils) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/echo/server/CMakeLists.txt b/channels/echo/server/CMakeLists.txt index 47fb633e6..8a90d903a 100644 --- a/channels/echo/server/CMakeLists.txt +++ b/channels/echo/server/CMakeLists.txt @@ -24,12 +24,7 @@ add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils freerdp-core) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/parallel/client/CMakeLists.txt b/channels/parallel/client/CMakeLists.txt index 84af28326..91f649a0b 100644 --- a/channels/parallel/client/CMakeLists.txt +++ b/channels/parallel/client/CMakeLists.txt @@ -24,14 +24,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} freerdp winpr) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/printer/client/CMakeLists.txt b/channels/printer/client/CMakeLists.txt index 5b055b667..f8bee2e36 100644 --- a/channels/printer/client/CMakeLists.txt +++ b/channels/printer/client/CMakeLists.txt @@ -40,12 +40,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) if(WITH_CUPS) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${CUPS_LIBRARIES}) diff --git a/channels/rail/client/CMakeLists.txt b/channels/rail/client/CMakeLists.txt index b44ce1614..e6b1bc4f8 100644 --- a/channels/rail/client/CMakeLists.txt +++ b/channels/rail/client/CMakeLists.txt @@ -29,12 +29,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/rdpdr/client/CMakeLists.txt b/channels/rdpdr/client/CMakeLists.txt index d96a0eb5d..39e05a505 100644 --- a/channels/rdpdr/client/CMakeLists.txt +++ b/channels/rdpdr/client/CMakeLists.txt @@ -31,14 +31,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} winpr freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/rdpdr/server/CMakeLists.txt b/channels/rdpdr/server/CMakeLists.txt index 17a18967e..32529e5bf 100644 --- a/channels/rdpdr/server/CMakeLists.txt +++ b/channels/rdpdr/server/CMakeLists.txt @@ -25,12 +25,7 @@ add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/rdpei/client/CMakeLists.txt b/channels/rdpei/client/CMakeLists.txt index e248d5f58..c792e3716 100644 --- a/channels/rdpei/client/CMakeLists.txt +++ b/channels/rdpei/client/CMakeLists.txt @@ -29,14 +29,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-common freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} winpr freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/rdpgfx/client/CMakeLists.txt b/channels/rdpgfx/client/CMakeLists.txt index abd8352df..06fe351ec 100644 --- a/channels/rdpgfx/client/CMakeLists.txt +++ b/channels/rdpgfx/client/CMakeLists.txt @@ -31,14 +31,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-common freerdp-codec freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} winpr freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/rdpsnd/client/CMakeLists.txt b/channels/rdpsnd/client/CMakeLists.txt index 68b442fce..53d16e832 100644 --- a/channels/rdpsnd/client/CMakeLists.txt +++ b/channels/rdpsnd/client/CMakeLists.txt @@ -25,14 +25,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-codec freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} winpr freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/rdpsnd/client/alsa/CMakeLists.txt b/channels/rdpsnd/client/alsa/CMakeLists.txt index cbe2ca20a..411ca642c 100644 --- a/channels/rdpsnd/client/alsa/CMakeLists.txt +++ b/channels/rdpsnd/client/alsa/CMakeLists.txt @@ -27,12 +27,7 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-codec freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ALSA_LIBRARIES}) diff --git a/channels/rdpsnd/client/ios/CMakeLists.txt b/channels/rdpsnd/client/ios/CMakeLists.txt index 673a4f99c..0190a6b7a 100644 --- a/channels/rdpsnd/client/ios/CMakeLists.txt +++ b/channels/rdpsnd/client/ios/CMakeLists.txt @@ -33,16 +33,13 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${AUDIO_TOOL} ${CORE_AUDIO} ${CORE_FOUNDATION}) +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) diff --git a/channels/rdpsnd/client/mac/CMakeLists.txt b/channels/rdpsnd/client/mac/CMakeLists.txt index 8a6f93cb8..103c40665 100644 --- a/channels/rdpsnd/client/mac/CMakeLists.txt +++ b/channels/rdpsnd/client/mac/CMakeLists.txt @@ -33,16 +33,13 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${AUDIO_TOOL} ${CORE_AUDIO} ${CORE_FOUNDATION}) +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) diff --git a/channels/rdpsnd/client/opensles/CMakeLists.txt b/channels/rdpsnd/client/opensles/CMakeLists.txt index dc5465a8e..9060761bf 100644 --- a/channels/rdpsnd/client/opensles/CMakeLists.txt +++ b/channels/rdpsnd/client/opensles/CMakeLists.txt @@ -28,13 +28,7 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-codec freerdp-utils - ${OPENSLES_LIBRARIES}) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${OPENSLES_LIBRARIES}) +set(${MODULE_PREFIX}_LIBS freerdp ${OPENSLES_LIBRARIES}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/channels/rdpsnd/client/pulse/CMakeLists.txt b/channels/rdpsnd/client/pulse/CMakeLists.txt index 6b6de1ecc..46d525749 100644 --- a/channels/rdpsnd/client/pulse/CMakeLists.txt +++ b/channels/rdpsnd/client/pulse/CMakeLists.txt @@ -27,12 +27,8 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-codec freerdp-utils) - list(APPEND ${MODULE_PREFIX}_LIBS ${PULSE_LIBRARY}) +list(APPEND ${MODULE_PREFIX}_LIBS freerdp) if(GSM_FOUND) list(APPEND ${MODULE_PREFIX}_LIBS ${GSM_LIBRARIES}) diff --git a/channels/rdpsnd/client/winmm/CMakeLists.txt b/channels/rdpsnd/client/winmm/CMakeLists.txt index 99aaae53f..2c670c3ba 100644 --- a/channels/rdpsnd/client/winmm/CMakeLists.txt +++ b/channels/rdpsnd/client/winmm/CMakeLists.txt @@ -26,14 +26,9 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winmm.lib) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/channels/rdpsnd/server/CMakeLists.txt b/channels/rdpsnd/server/CMakeLists.txt index 9cb5c1d6f..09fef66e3 100644 --- a/channels/rdpsnd/server/CMakeLists.txt +++ b/channels/rdpsnd/server/CMakeLists.txt @@ -25,12 +25,7 @@ add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-codec freerdp-utils) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/remdesk/client/CMakeLists.txt b/channels/remdesk/client/CMakeLists.txt index a3ab1cfd5..ed90b2948 100644 --- a/channels/remdesk/client/CMakeLists.txt +++ b/channels/remdesk/client/CMakeLists.txt @@ -25,12 +25,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-common) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/serial/client/CMakeLists.txt b/channels/serial/client/CMakeLists.txt index 8f2532473..1a40d472a 100644 --- a/channels/serial/client/CMakeLists.txt +++ b/channels/serial/client/CMakeLists.txt @@ -24,14 +24,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} winpr freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/server/CMakeLists.txt b/channels/server/CMakeLists.txt index 63e0f3dc6..4723368cb 100644 --- a/channels/server/CMakeLists.txt +++ b/channels/server/CMakeLists.txt @@ -35,13 +35,7 @@ if (WITH_LIBRARY_VERSIONING) endif() set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-codec freerdp-utils) - - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} PARENT_SCOPE) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) diff --git a/channels/smartcard/client/CMakeLists.txt b/channels/smartcard/client/CMakeLists.txt index a3e263aee..b38464cc0 100644 --- a/channels/smartcard/client/CMakeLists.txt +++ b/channels/smartcard/client/CMakeLists.txt @@ -28,14 +28,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} winpr freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/tsmf/client/CMakeLists.txt b/channels/tsmf/client/CMakeLists.txt index 87e6dea8c..1e0751993 100644 --- a/channels/tsmf/client/CMakeLists.txt +++ b/channels/tsmf/client/CMakeLists.txt @@ -40,12 +40,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils freerdp-common) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} freerdp) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets) diff --git a/channels/tsmf/client/alsa/CMakeLists.txt b/channels/tsmf/client/alsa/CMakeLists.txt index 8e1fbde13..143a69be9 100644 --- a/channels/tsmf/client/alsa/CMakeLists.txt +++ b/channels/tsmf/client/alsa/CMakeLists.txt @@ -27,13 +27,6 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-codec freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ALSA_LIBRARIES}) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +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 c321d7013..d381cd97b 100644 --- a/channels/tsmf/client/ffmpeg/CMakeLists.txt +++ b/channels/tsmf/client/ffmpeg/CMakeLists.txt @@ -27,18 +27,13 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - if(APPLE) # For this to work on apple, we need to add some frameworks FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation) FIND_LIBRARY(COREVIDEO_LIBRARY CoreVideo) FIND_LIBRARY(COREVIDEODECODE_LIBRARY VideoDecodeAcceleration) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${FFMPEG_LIBRARIES} ${COREFOUNDATION_LIBRARY} ${COREVIDEO_LIBRARY} ${COREVIDEODECODE_LIBRARY}) - target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) + target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} freerdp) else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${FFMPEG_LIBRARIES}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/channels/tsmf/client/gstreamer/CMakeLists.txt b/channels/tsmf/client/gstreamer/CMakeLists.txt index 3415da717..ee07c947c 100644 --- a/channels/tsmf/client/gstreamer/CMakeLists.txt +++ b/channels/tsmf/client/gstreamer/CMakeLists.txt @@ -64,14 +64,6 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} - ${LIBS}) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} ${LIBS} freerdp) 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 cdfa7fe5a..f0cf8abd9 100644 --- a/channels/tsmf/client/pulse/CMakeLists.txt +++ b/channels/tsmf/client/pulse/CMakeLists.txt @@ -27,13 +27,6 @@ add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_N set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-codec freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${PULSE_LIBRARY}) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +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 1dd4ab54c..4d5069f93 100644 --- a/channels/urbdrc/client/CMakeLists.txt +++ b/channels/urbdrc/client/CMakeLists.txt @@ -42,12 +42,7 @@ set(${MODULE_PREFIX}_LIBS ${UDEV_LIBRARIES} ${UUID_LIBRARIES}) -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-common freerdp-utils) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/client/Android/FreeRDPCore/jni/CMakeLists.txt b/client/Android/FreeRDPCore/jni/CMakeLists.txt index d2ea3b839..2b704b79d 100644 --- a/client/Android/FreeRDPCore/jni/CMakeLists.txt +++ b/client/Android/FreeRDPCore/jni/CMakeLists.txt @@ -55,13 +55,7 @@ endif() add_library(${MODULE_NAME} SHARED ${${MODULE_PREFIX}_SRCS}) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client) - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-core freerdp-gdi freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} dl) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} log) diff --git a/client/DirectFB/CMakeLists.txt b/client/DirectFB/CMakeLists.txt index 75eafc251..6cf7cead9 100644 --- a/client/DirectFB/CMakeLists.txt +++ b/client/DirectFB/CMakeLists.txt @@ -32,13 +32,7 @@ add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set(${MODULE_PREFIX}_LIBS ${DIRECTFB_LIBRARIES}) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client) - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-core freerdp-gdi freerdp-locale freerdp-codec freerdp-primitives freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/client/Mac/CMakeLists.txt b/client/Mac/CMakeLists.txt index 91eb01bdb..863ec827a 100644 --- a/client/Mac/CMakeLists.txt +++ b/client/Mac/CMakeLists.txt @@ -79,12 +79,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES BUILD_WITH_INSTALL_RPATH 1) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${EXTRA_LIBS} freerdp-client) - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-core freerdp-cache freerdp-gdi freerdp-codec freerdp-primitives freerdp-rail freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/client/Sample/CMakeLists.txt b/client/Sample/CMakeLists.txt index c5070a7bd..f9506b315 100644 --- a/client/Sample/CMakeLists.txt +++ b/client/Sample/CMakeLists.txt @@ -24,14 +24,7 @@ set(${MODULE_PREFIX}_SRCS add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${CMAKE_DL_LIBS}) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client) - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-core freerdp-gdi freerdp-utils) - +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/Sample") diff --git a/client/Windows/CMakeLists.txt b/client/Windows/CMakeLists.txt index f9bd93a00..5de11bd9f 100644 --- a/client/Windows/CMakeLists.txt +++ b/client/Windows/CMakeLists.txt @@ -60,15 +60,7 @@ else() endif() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client) - - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-core freerdp-gdi freerdp-codec freerdp-primitives freerdp-utils) - +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) if(WITH_CLIENT_INTERFACE) diff --git a/client/X11/CMakeLists.txt b/client/X11/CMakeLists.txt index 35e3e932e..a6bd5b5cf 100644 --- a/client/X11/CMakeLists.txt +++ b/client/X11/CMakeLists.txt @@ -89,14 +89,7 @@ if(WITH_MANPAGES) add_executable(generate_argument_docbook generate_argument_docbook.c) set(GAD_LIBS freerdp-client) - - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - - set_complex_link_libraries(VARIABLE GAD_LIBS MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-core freerdp-utils) - - target_link_libraries(generate_argument_docbook ${GAD_LIBS}) + target_link_libraries(generate_argument_docbook ${GAD_LIBS} freerdp winpr) add_custom_command(OUTPUT xfreerdp.1 COMMAND generate_argument_docbook @@ -206,12 +199,7 @@ endif() include_directories(${CMAKE_SOURCE_DIR}/resources) -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client) - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-core freerdp-gdi freerdp-locale freerdp-primitives freerdp-rail freerdp-utils) - +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp freerdp-client) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) if(WITH_IPP) diff --git a/client/common/CMakeLists.txt b/client/common/CMakeLists.txt index 0a96bf541..5ac33ff2a 100644 --- a/client/common/CMakeLists.txt +++ b/client/common/CMakeLists.txt @@ -58,11 +58,7 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES}) -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-core) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/client/iOS/CMakeLists.txt b/client/iOS/CMakeLists.txt index 52bbc1739..ed14fecd2 100644 --- a/client/iOS/CMakeLists.txt +++ b/client/iOS/CMakeLists.txt @@ -125,11 +125,7 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${EXTRA_LIBS}) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client) -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-core freerdp-gdi freerdp-locale freerdp-primitives freerdp-cache freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/cmake/CheckCmakeCompat.cmake b/cmake/CheckCmakeCompat.cmake index 19710b2ad..6b9f9cc12 100644 --- a/cmake/CheckCmakeCompat.cmake +++ b/cmake/CheckCmakeCompat.cmake @@ -28,13 +28,6 @@ enable_cmake_compat(2.8.6) enable_cmake_compat(2.8.3) enable_cmake_compat(2.8.2) -# If MONOLITHIC_BUILD is used with cmake < 2.8.8 build fails -if (MONOLITHIC_BUILD) - if(${CMAKE_VERSION} VERSION_LESS 2.8.8) - message(FATAL_ERROR "CMAKE version >= 2.8.8 required for MONOLITHIC_BUILD") - endif() -endif(MONOLITHIC_BUILD) - # GetGitRevisionDescription requires FindGit which was added in version 2.8.2 # build won't fail but GIT_REVISION is set to n/a if(${CMAKE_VERSION} VERSION_LESS 2.8.2) diff --git a/cmake/ConfigOptions.cmake b/cmake/ConfigOptions.cmake index 2fcec230f..17af6d9cd 100644 --- a/cmake/ConfigOptions.cmake +++ b/cmake/ConfigOptions.cmake @@ -59,14 +59,6 @@ option(WITH_SMARTCARD_INSPECT "Enable SmartCard API Inspector" OFF) option(BUILD_TESTING "Build unit tests" OFF) option(WITH_SAMPLE "Build sample code" OFF) -if(${CMAKE_VERSION} VERSION_GREATER 2.8.8) - if(ANDROID) - option(MONOLITHIC_BUILD "Use monolithic build" ON) - else() - option(MONOLITHIC_BUILD "Use monolithic build" OFF) - endif() -endif() - option(WITH_CLIENT "Build client binaries" ON) option(WITH_SERVER "Build server binaries" OFF) diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt index c11458f52..54bc042e1 100644 --- a/libfreerdp/CMakeLists.txt +++ b/libfreerdp/CMakeLists.txt @@ -18,55 +18,272 @@ set(MODULE_NAME "freerdp") set(MODULE_PREFIX "FREERDP") -if(MONOLITHIC_BUILD) - set(CMAKE_POSITION_INDEPENDENT_CODE ON) -endif() - # Create imported targets for Intel IPP libraries if(IPP_FOUND) foreach(ipp_lib ${IPP_LIBRARIES}) - add_library("${ipp_lib}_imported" STATIC IMPORTED) + add_library("${ipp_lib}_imported" STATIC IMPORTED) set_property(TARGET "${ipp_lib}_imported" PROPERTY IMPORTED_LOCATION "${IPP_LIBRARY_DIRS}/${ipp_lib}") endforeach() endif() +set(LIBFREERDP_DIR ${CMAKE_CURRENT_SOURCE_DIR}) +set(LIBFREERDP_SRCS "") +set(LIBFREERDP_LIBS "") +set(LIBFREERDP_INCLUDES "") +set(LIBFREERDP_DEFINITIONS "") + +macro (freerdp_module_add) + file (RELATIVE_PATH _relPath "${LIBFREERDP_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}") + foreach (_src ${ARGN}) + if (_relPath) + list (APPEND LIBFREERDP_SRCS "${_relPath}/${_src}") + else() + list (APPEND LIBFREERDP_SRCS "${_src}") + endif() + endforeach() + if (_relPath) + set (LIBFREERDP_SRCS ${LIBFREERDP_SRCS} PARENT_SCOPE) + endif() +endmacro() + +macro (freerdp_include_directory_add) + file (RELATIVE_PATH _relPath "${LIBFREERDP_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}") + foreach (_inc ${ARGN}) + if (IS_ABSOLUTE ${_inc}) + list (APPEND LIBFREERDP_INCLUDES "${_inc}") + else() + if (_relPath) + list (APPEND LIBFREERDP_INCLUDES "${_relPath}/${_inc}") + else() + list (APPEND LIBFREERDP_INCLUDES "${_inc}") + endif() + endif() + endforeach() + if (_relPath) + set (LIBFREERDP_INCLUDES ${LIBFREERDP_INCLUDES} PARENT_SCOPE) + endif() +endmacro() + +macro (freerdp_library_add) + foreach (_lib ${ARGN}) + list (APPEND LIBFREERDP_LIBS "${_lib}") + endforeach() + set (LIBFREERDP_LIBS ${LIBFREERDP_LIBS} PARENT_SCOPE) +endmacro() + +macro (freerdp_definition_add) + foreach (_define ${ARGN}) + list (APPEND LIBFREERDP_DEFINITIONS "${_define}") + endforeach() + set (LIBFREERDP_DEFINITIONS ${LIBFREERDP_DEFINITIONS} PARENT_SCOPE) +endmacro() + set(${MODULE_PREFIX}_SUBMODULES utils common gdi rail cache - codec crypto locale - primitives core) foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES}) add_subdirectory(${${MODULE_PREFIX}_SUBMODULE}) endforeach() -if(MONOLITHIC_BUILD) - foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES}) - set(${MODULE_PREFIX}_OBJECTS ${${MODULE_PREFIX}_OBJECTS} "$") +## cmake source properties are only seen by targets in the same CMakeLists.txt +## therefore primitives and codecs need to be defined here + +# codec +set(CODEC_SRCS + codec/dsp.c + codec/color.c + codec/audio.c + codec/planar.c + codec/bitmap.c + codec/interleaved.c + codec/progressive.c + codec/rfx_bitstream.h + codec/rfx_constants.h + codec/rfx_decode.c + codec/rfx_decode.h + codec/rfx_differential.c + codec/rfx_differential.h + codec/rfx_dwt.c + codec/rfx_dwt.h + codec/rfx_encode.c + codec/rfx_encode.h + codec/rfx_quantization.c + codec/rfx_quantization.h + codec/rfx_rlgr.c + codec/rfx_rlgr.h + codec/rfx_types.h + codec/rfx.c + codec/region.c + codec/nsc.c + codec/nsc_encode.c + codec/nsc_encode.h + codec/nsc_types.h + codec/ncrush.c + codec/xcrush.c + codec/mppc.c + codec/zgfx.c + codec/clear.c + codec/jpeg.c + codec/h264.c) + +set(CODEC_SSE2_SRCS + codec/rfx_sse2.c + codec/rfx_sse2.h + codec/nsc_sse2.c + codec/nsc_sse2.h) + +set(CODEC_NEON_SRCS + codec/rfx_neon.c + codec/rfx_neon.h) + +if(WITH_SSE2) + set(CODEC_SRCS ${CODEC_SRCS} ${CODEC_SSE2_SRCS}) + + if(CMAKE_COMPILER_IS_GNUCC) + set_source_files_properties(${CODEC_SSE2_SRCS} PROPERTIES COMPILE_FLAGS "-msse2" ) + endif() + + if(MSVC) + set_source_files_properties(${CODEC_SSE2_SRCS} PROPERTIES COMPILE_FLAGS "/arch:SSE2" ) + endif() +endif() + +if(WITH_NEON) + set_source_files_properties(${CODEC_NEON_SRCS} PROPERTIES COMPILE_FLAGS "-mfpu=neon -mfloat-abi=${ARM_FP_ABI} -Wno-unused-variable" ) + set(CODEC_SRCS ${CODEC_SRCS} ${CODEC_NEON_SRCS}) +endif() + +if(WITH_JPEG) + freerdp_include_directory_add(${JPEG_INCLUDE_DIR}) + freerdp_library_add(${JPEG_LIBRARIES}) +endif() + +if(WITH_OPENH264) + freerdp_definition_add(-DWITH_OPENH264) + freerdp_include_directory_add(${OPENH264_INCLUDE_DIR}) + freerdp_library_add(${OPENH264_LIBRARIES}) +endif() + +if(WITH_LIBAVCODEC) + freerdp_definition_add(-DWITH_LIBAVCODEC) + find_library(LIBAVCODEC_LIB avcodec) + find_library(LIBAVUTIL_LIB avutil) + freerdp_library_add(${LIBAVCODEC_LIB} ${LIBAVUTIL_LIB}) +endif() + +freerdp_module_add(${CODEC_SRCS}) + +if(BUILD_TESTING) + add_subdirectory(codec/test) +endif() + +# /codec + +# primitives + +set(PRIMITIVES_SRCS + primitives/prim_16to32bpp.c + primitives/prim_add.c + primitives/prim_andor.c + primitives/prim_alphaComp.c + primitives/prim_colors.c + primitives/prim_copy.c + primitives/prim_set.c + primitives/prim_shift.c + primitives/prim_sign.c + primitives/prim_YUV.c + primitives/prim_YCoCg.c + primitives/primitives.c + primitives/prim_internal.h) + +set(PRIMITIVES_OPT_SRCS + primitives/prim_16to32bpp_opt.c + primitives/prim_add_opt.c + primitives/prim_andor_opt.c + primitives/prim_alphaComp_opt.c + primitives/prim_colors_opt.c + primitives/prim_set_opt.c + primitives/prim_shift_opt.c + primitives/prim_sign_opt.c + primitives/prim_YUV_opt.c + primitives/prim_YCoCg_opt.c) + +freerdp_definition_add(-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) + +### IPP Variable debugging +if(WITH_IPP) + if(CMAKE_COMPILER_IS_GNUCC) + foreach(INCLDIR ${IPP_INCLUDE_DIRS}) + set(OPTIMIZATION "${OPTIMIZATION} -I${INCLDIR}") + endforeach(INCLDIR) + endif() +endif() + +if(WITH_SSE2) + if(CMAKE_COMPILER_IS_GNUCC) + set(OPTIMIZATION "${OPTIMIZATION} -msse2 -mssse3 -O2 -Wdeclaration-after-statement") + endif() + + if(MSVC) + set(OPTIMIZATION "${OPTIMIZATION} /arch:SSE2") + endif() +elseif(WITH_NEON) + if(CMAKE_COMPILER_IS_GNUCC) + set(OPTIMIZATION "${OPTIMIZATION} -mfpu=neon -mfloat-abi=${ARM_FP_ABI}") + endif() + # TODO: Add MSVC equivalent +endif() + +if(DEFINED OPTIMIZATION) + set_source_files_properties(${PRIMITIVES_OPT_SRCS} PROPERTIES COMPILE_FLAGS ${OPTIMIZATION}) +endif() + + +# always compile with optimization +if(CMAKE_COMPILER_IS_GNUCC) + set_source_files_properties(${PRIMITIVES_SRCS} PROPERTIES COMPILE_FLAGS "-O2") +endif() + +set(PRIMITIVES_SRCS ${PRIMITIVES_SRCS} ${PRIMITIVES_OPT_SRCS}) + +freerdp_module_add(${PRIMITIVES_SRCS}) + +if(IPP_FOUND) + freerdp_include_directory_add(${IPP_INCLUDE_DIRS}) + foreach(ipp_lib ${IPP_LIBRARIES}) + freerdp_library_add("${ipp_lib}_imported") endforeach() +endif() - add_library(${MODULE_NAME} dummy.c - ${${MODULE_PREFIX}_OBJECTS}) +if(BUILD_TESTING AND NOT WIN32 AND NOT APPLE) + add_subdirectory(primitives/test) +endif() - set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C) - if (WITH_LIBRARY_VERSIONING) - set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) - endif() - set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib") - list(APPEND FREERDP_LIBS ${PROFILER_LIBRARIES}) - list(REMOVE_DUPLICATES FREERDP_LIBS) +# /primitives - target_link_libraries(${MODULE_NAME} ${FREERDP_LIBS}) +list(REMOVE_DUPLICATES LIBFREERDP_DEFINITIONS) +list(REMOVE_DUPLICATES LIBFREERDP_LIBS) +list(REMOVE_DUPLICATES LIBFREERDP_INCLUDES) +include_directories(${LIBFREERDP_INCLUDES}) +add_library(${MODULE_NAME} ${LIBFREERDP_SRCS}) +add_definitions(${LIBFREERDP_DEFINITIONS}) - install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT FreeRDPTargets) - - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") -endif(MONOLITHIC_BUILD) +set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C) + +if (WITH_LIBRARY_VERSIONING) + set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) +endif() +set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib") + +target_link_libraries(${MODULE_NAME} ${LIBFREERDP_LIBS} winpr) +install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT FreeRDPTargets) +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") diff --git a/libfreerdp/cache/CMakeLists.txt b/libfreerdp/cache/CMakeLists.txt index 5a52a048b..d1cf5b37e 100644 --- a/libfreerdp/cache/CMakeLists.txt +++ b/libfreerdp/cache/CMakeLists.txt @@ -18,7 +18,7 @@ set(MODULE_NAME "freerdp-cache") set(MODULE_PREFIX "FREERDP_CACHE") -set(${MODULE_PREFIX}_SRCS +freerdp_module_add( brush.c pointer.c bitmap.c @@ -28,26 +28,3 @@ set(${MODULE_PREFIX}_SRCS glyph.c cache.c) -add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT" - MONOLITHIC ${MONOLITHIC_BUILD} - SOURCES ${${MODULE_PREFIX}_SRCS} - EXPORT) - -if (WITH_LIBRARY_VERSIONING) - set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) -endif() -set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib") - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL - MODULE freerdp - MODULES freerdp-core freerdp-utils) - -if(MONOLITHIC_BUILD) - set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) -else() - target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT FreeRDPTargets) -endif() - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") diff --git a/libfreerdp/codec/CMakeLists.txt b/libfreerdp/codec/CMakeLists.txt deleted file mode 100644 index bab5714f6..000000000 --- a/libfreerdp/codec/CMakeLists.txt +++ /dev/null @@ -1,139 +0,0 @@ -# FreeRDP: A Remote Desktop Protocol Implementation -# libfreerdp-codec cmake build script -# -# Copyright 2012 Marc-Andre Moreau -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set(MODULE_NAME "freerdp-codec") -set(MODULE_PREFIX "FREERDP_CODEC") - -set(${MODULE_PREFIX}_SRCS - dsp.c - color.c - audio.c - planar.c - bitmap.c - interleaved.c - progressive.c - rfx_bitstream.h - rfx_constants.h - rfx_decode.c - rfx_decode.h - rfx_differential.c - rfx_differential.h - rfx_dwt.c - rfx_dwt.h - rfx_encode.c - rfx_encode.h - rfx_quantization.c - rfx_quantization.h - rfx_rlgr.c - rfx_rlgr.h - rfx_types.h - rfx.c - region.c - nsc.c - nsc_encode.c - nsc_encode.h - nsc_types.h - ncrush.c - xcrush.c - mppc.c - zgfx.c - clear.c - jpeg.c - h264.c) - -set(${MODULE_PREFIX}_SSE2_SRCS - rfx_sse2.c - rfx_sse2.h - nsc_sse2.c - nsc_sse2.h) - -set(${MODULE_PREFIX}_NEON_SRCS - rfx_neon.c - rfx_neon.h) - -if(WITH_SSE2) - set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${${MODULE_PREFIX}_SSE2_SRCS}) - - if(CMAKE_COMPILER_IS_GNUCC) - set_source_files_properties(${${MODULE_PREFIX}_SSE2_SRCS} PROPERTIES COMPILE_FLAGS "-msse2") - endif() - - if(MSVC) - set_source_files_properties(${${MODULE_PREFIX}_SSE2_SRCS} PROPERTIES COMPILE_FLAGS "/arch:SSE2") - endif() -endif() - -if(WITH_NEON) - set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${${MODULE_PREFIX}_NEON_SRCS}) - set_source_files_properties(${${MODULE_PREFIX}_NEON_SRCS} PROPERTIES COMPILE_FLAGS "-mfpu=neon -mfloat-abi=${ARM_FP_ABI} -Wno-unused-variable") -endif() - -if(WITH_JPEG) - include_directories(${JPEG_INCLUDE_DIR}) - set(FREERDP_JPEG_LIBS ${JPEG_LIBRARIES}) -endif() - -if(WITH_OPENH264) - add_definitions(-DWITH_OPENH264) - include_directories(${OPENH264_INCLUDE_DIR}) - set(FREERDP_OPENH264_LIBS ${OPENH264_LIBRARIES}) -endif() - -if(WITH_LIBAVCODEC) - add_definitions(-DWITH_LIBAVCODEC) - find_library(LIBAVCODEC_LIB avcodec) - find_library(LIBAVUTIL_LIB avutil) - set(FREERDP_LIBAVCODEC_LIBS ${LIBAVCODEC_LIB} ${LIBAVUTIL_LIB}) -endif() - - -add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT" - MONOLITHIC ${MONOLITHIC_BUILD} - SOURCES ${${MODULE_PREFIX}_SRCS} - EXPORT) - -if (WITH_LIBRARY_VERSIONING) - set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) -endif() -set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib") - -set(${MODULE_PREFIX}_LIBS - ${FREERDP_JPEG_LIBS} - ${FREERDP_OPENH264_LIBS} - ${FREERDP_LIBAVCODEC_LIBS}) - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL - MODULE freerdp - MODULES freerdp-primitives freerdp-utils) - - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -if(MONOLITHIC_BUILD) - set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) -else() - target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT FreeRDPTargets) -endif() - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") - -if(BUILD_TESTING) - add_subdirectory(test) -endif() - diff --git a/libfreerdp/codec/test/CMakeLists.txt b/libfreerdp/codec/test/CMakeLists.txt index 6ce9c65c2..83574d8c2 100644 --- a/libfreerdp/codec/test/CMakeLists.txt +++ b/libfreerdp/codec/test/CMakeLists.txt @@ -21,12 +21,7 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-codec) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} freerdp) set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}") diff --git a/libfreerdp/common/CMakeLists.txt b/libfreerdp/common/CMakeLists.txt index 2bdca84a3..05cadf43c 100644 --- a/libfreerdp/common/CMakeLists.txt +++ b/libfreerdp/common/CMakeLists.txt @@ -23,32 +23,12 @@ set(${MODULE_PREFIX}_SRCS settings.c assistance.c) -add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT" - MONOLITHIC ${MONOLITHIC_BUILD} - SOURCES ${${MODULE_PREFIX}_SRCS} - EXPORT) +freerdp_module_add(${${MODULE_PREFIX}_SRCS}) -include_directories(${OPENSSL_INCLUDE_DIR}) -include_directories(${ZLIB_INCLUDE_DIRS}) +freerdp_include_directory_add(${OPENSSL_INCLUDE_DIR}) +freerdp_include_directory_add(${ZLIB_INCLUDE_DIRS}) -if (WITH_LIBRARY_VERSIONING) - set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION}) -endif() -set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib") - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} - ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES}) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -if(MONOLITHIC_BUILD) - set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) -else() - target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT FreeRDPTargets) -endif() - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") +freerdp_library_add(${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES}) if(BUILD_TESTING) add_subdirectory(test) diff --git a/libfreerdp/common/test/CMakeLists.txt b/libfreerdp/common/test/CMakeLists.txt index e8096b5df..3247101cc 100644 --- a/libfreerdp/common/test/CMakeLists.txt +++ b/libfreerdp/common/test/CMakeLists.txt @@ -13,12 +13,7 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-common) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} freerdp) set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}") diff --git a/libfreerdp/core/CMakeLists.txt b/libfreerdp/core/CMakeLists.txt index 20961a213..0f020304a 100644 --- a/libfreerdp/core/CMakeLists.txt +++ b/libfreerdp/core/CMakeLists.txt @@ -18,10 +18,10 @@ set(MODULE_NAME "freerdp-core") set(MODULE_PREFIX "FREERDP_CORE") -add_definitions(-DEXT_PATH="${FREERDP_EXTENSION_PATH}") +freerdp_definition_add(-DEXT_PATH="${FREERDP_EXTENSION_PATH}") -include_directories(${OPENSSL_INCLUDE_DIR}) -include_directories(${ZLIB_INCLUDE_DIRS}) +freerdp_include_directory_add(${OPENSSL_INCLUDE_DIR}) +freerdp_include_directory_add(${ZLIB_INCLUDE_DIRS}) set(${MODULE_PREFIX}_GATEWAY_DIR "gateway") @@ -126,38 +126,13 @@ set(${MODULE_PREFIX}_SRCS set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${${MODULE_PREFIX}_GATEWAY_SRCS}) -add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT" - MONOLITHIC ${MONOLITHIC_BUILD} - SOURCES ${${MODULE_PREFIX}_SRCS} - EXPORT) - -if (WITH_LIBRARY_VERSIONING) - set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) -endif() -set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib") +freerdp_module_add(${${MODULE_PREFIX}_SRCS}) if(WIN32) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ws2_32) + freerdp_library_add(ws2_32) else() - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ZLIB_LIBRARIES}) + freerdp_library_add(${ZLIB_LIBRARIES}) endif() -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${OPENSSL_LIBRARIES}) - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL - MODULE freerdp - MODULES freerdp-crypto freerdp-codec freerdp-locale freerdp-common freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -if(MONOLITHIC_BUILD) - set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) -else() - target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT FreeRDPTargets) -endif() - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") - - +freerdp_library_add(${OPENSSL_LIBRARIES}) diff --git a/libfreerdp/crypto/CMakeLists.txt b/libfreerdp/crypto/CMakeLists.txt index b307cb3a6..56dd9e99c 100644 --- a/libfreerdp/crypto/CMakeLists.txt +++ b/libfreerdp/crypto/CMakeLists.txt @@ -18,7 +18,7 @@ set(MODULE_NAME "freerdp-crypto") set(MODULE_PREFIX "FREERDP_CRYPTO") -set(${MODULE_PREFIX}_SRCS +freerdp_module_add( er.c der.c ber.c @@ -28,44 +28,17 @@ set(${MODULE_PREFIX}_SRCS crypto.c tls.c) -add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT" - MONOLITHIC ${MONOLITHIC_BUILD} - SOURCES ${${MODULE_PREFIX}_SRCS} - EXPORT) +freerdp_include_directory_add(${OPENSSL_INCLUDE_DIR}) +freerdp_include_directory_add(${ZLIB_INCLUDE_DIRS}) -include_directories(${OPENSSL_INCLUDE_DIR}) -include_directories(${ZLIB_INCLUDE_DIRS}) - -if (WITH_LIBRARY_VERSIONING) - set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) -endif() -set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib") - -set(${MODULE_PREFIX}_LIBS - ${OPENSSL_LIBRARIES}) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +freerdp_library_add(${OPENSSL_LIBRARIES}) if(WIN32) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ws2_32) + freerdp_library_add(ws2_32) else() - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ZLIB_LIBRARIES}) + freerdp_library_add(${ZLIB_LIBRARIES}) endif() -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL - MODULE freerdp - MODULES freerdp-utils) - -if(MONOLITHIC_BUILD) - set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) -else() - target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT FreeRDPTargets) -endif() - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") - if(BUILD_TESTING) add_subdirectory(test) endif() diff --git a/libfreerdp/crypto/test/CMakeLists.txt b/libfreerdp/crypto/test/CMakeLists.txt index 4333b010f..56023e08f 100644 --- a/libfreerdp/crypto/test/CMakeLists.txt +++ b/libfreerdp/crypto/test/CMakeLists.txt @@ -13,12 +13,7 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-crypto) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} freerdp) set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}") diff --git a/libfreerdp/dummy.c b/libfreerdp/dummy.c deleted file mode 100644 index fb941c948..000000000 --- a/libfreerdp/dummy.c +++ /dev/null @@ -1,5 +0,0 @@ - -int freerdp_dummy() -{ - return 0; -} diff --git a/libfreerdp/gdi/CMakeLists.txt b/libfreerdp/gdi/CMakeLists.txt index c831bbd04..be50798de 100644 --- a/libfreerdp/gdi/CMakeLists.txt +++ b/libfreerdp/gdi/CMakeLists.txt @@ -39,29 +39,7 @@ set(${MODULE_PREFIX}_SRCS gdi.c gdi.h) -add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT" - MONOLITHIC ${MONOLITHIC_BUILD} - SOURCES ${${MODULE_PREFIX}_SRCS} - EXPORT) - -if (WITH_LIBRARY_VERSIONING) - set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) -endif() -set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib") - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL - MODULE freerdp - MODULES freerdp-core freerdp-cache freerdp-codec) - -if(MONOLITHIC_BUILD) - set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) -else() - target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT FreeRDPTargets) -endif() - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") +freerdp_module_add(${${MODULE_PREFIX}_SRCS}) if(BUILD_TESTING) add_subdirectory(test) diff --git a/libfreerdp/gdi/test/CMakeLists.txt b/libfreerdp/gdi/test/CMakeLists.txt index 4a2ba50fc..8f9845bf1 100644 --- a/libfreerdp/gdi/test/CMakeLists.txt +++ b/libfreerdp/gdi/test/CMakeLists.txt @@ -21,16 +21,7 @@ include_directories(..) add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}) - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-gdi) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} winpr freerdp) set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}") diff --git a/libfreerdp/locale/CMakeLists.txt b/libfreerdp/locale/CMakeLists.txt index 67f2145c1..f6bdf73f8 100644 --- a/libfreerdp/locale/CMakeLists.txt +++ b/libfreerdp/locale/CMakeLists.txt @@ -44,13 +44,13 @@ if(CMAKE_SYSTEM_NAME MATCHES Solaris) endif() if(WITH_X11) - add_definitions(-DWITH_X11) - include_directories(${X11_INCLUDE_DIRS}) + freerdp_definition_add(-DWITH_X11) + freerdp_include_directory_add(${X11_INCLUDE_DIRS}) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${${MODULE_PREFIX}_X11_SRCS}) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${X11_LIBRARIES}) + freerdp_library_add(${X11_LIBRARIES}) if(WITH_SUN) - add_definitions(-DWITH_SUN) + freerdp_definition_add(-DWITH_SUN) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${${MODULE_PREFIX}_SUN_SRCS}) endif() @@ -61,37 +61,13 @@ if(WITH_X11) find_feature(XKBFile ${XKBFILE_FEATURE_TYPE} ${XKBFILE_FEATURE_PURPOSE} ${XKBFILE_FEATURE_DESCRIPTION}) if(WITH_XKBFILE AND (NOT APPLE)) - add_definitions(-DWITH_XKBFILE) - include_directories(${XKBFILE_INCLUDE_DIRS}) + freerdp_definition_add(-DWITH_XKBFILE) + freerdp_include_directory_add(${XKBFILE_INCLUDE_DIRS}) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${${MODULE_PREFIX}_XKBFILE_SRCS}) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${XKBFILE_LIBRARIES}) + freerdp_library_add(${XKBFILE_LIBRARIES}) else() set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${${MODULE_PREFIX}_X11_KEYMAP_SRCS}) endif() endif() -add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT" - MONOLITHIC ${MONOLITHIC_BUILD} - SOURCES ${${MODULE_PREFIX}_SRCS} - EXPORT) - -if (WITH_LIBRARY_VERSIONING) - set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) -endif() -set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib") - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL - MODULE freerdp - MODULES freerdp-utils) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -if(MONOLITHIC_BUILD) - set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) -else() - target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT FreeRDPTargets) -endif() - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") +freerdp_module_add(${${MODULE_PREFIX}_SRCS}) diff --git a/libfreerdp/primitives/CMakeLists.txt b/libfreerdp/primitives/CMakeLists.txt deleted file mode 100644 index 0cf492670..000000000 --- a/libfreerdp/primitives/CMakeLists.txt +++ /dev/null @@ -1,112 +0,0 @@ -# FreeRDP: A Remote Desktop Protocol Client -# libfreerdp-primitives cmake build script -# vi:ts=4 sw=4: -# -# (c) Copyright 2012 Hewlett-Packard Development Company, L.P. -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. See the License for the specific language governing permissions -# and limitations under the License. -# - -set(MODULE_NAME "freerdp-primitives") -set(MODULE_PREFIX "FREERDP_PRIMITIVES") - -set(${MODULE_PREFIX}_SRCS - prim_16to32bpp.c - prim_add.c - prim_andor.c - prim_alphaComp.c - prim_colors.c - prim_copy.c - prim_set.c - prim_shift.c - prim_sign.c - prim_YUV.c - prim_YCoCg.c - primitives.c - prim_internal.h) - -set(${MODULE_PREFIX}_OPT_SRCS - prim_16to32bpp_opt.c - prim_add_opt.c - prim_andor_opt.c - prim_alphaComp_opt.c - prim_colors_opt.c - prim_set_opt.c - prim_shift_opt.c - prim_sign_opt.c - prim_YUV_opt.c - prim_YCoCg_opt.c) - -add_definitions(-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) - -### IPP Variable debugging -if(WITH_IPP) - if(CMAKE_COMPILER_IS_GNUCC) - foreach(INCLDIR ${IPP_INCLUDE_DIRS}) - set(OPTIMIZATION "${OPTIMIZATION} -I${INCLDIR}") - endforeach(INCLDIR) - endif() -endif() - -if(WITH_SSE2) - if(CMAKE_COMPILER_IS_GNUCC) - set(OPTIMIZATION "${OPTIMIZATION} -msse2 -mssse3 -O2 -Wdeclaration-after-statement") - endif() - - if(MSVC) - set(OPTIMIZATION "${OPTIMIZATION} /arch:SSE2") - endif() -elseif(WITH_NEON) - if(CMAKE_COMPILER_IS_GNUCC) - set(OPTIMIZATION "${OPTIMIZATION} -mfpu=neon -mfloat-abi=${ARM_FP_ABI}") - endif() - # TODO: Add MSVC equivalent -endif() - -set_property(SOURCE ${${MODULE_PREFIX}_OPT_SRCS} PROPERTY COMPILE_FLAGS ${OPTIMIZATION}) - -# always compile with optimization -if(CMAKE_COMPILER_IS_GNUCC) - set_property(SOURCE ${${MODULE_PREFIX}_SRCS} PROPERTY COMPILE_FLAGS "-O2") -endif() - -set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${${MODULE_PREFIX}_OPT_SRCS}) - -add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT" - MONOLITHIC ${MONOLITHIC_BUILD} - SOURCES ${${MODULE_PREFIX}_SRCS} - EXPORT) - -if (WITH_LIBRARY_VERSIONING) - set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) -endif() -set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib") - -if(IPP_FOUND) - include_directories(${IPP_INCLUDE_DIRS}) - foreach(ipp_lib ${IPP_LIBRARIES}) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} "${ipp_lib}_imported") - endforeach() -endif() - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -if(MONOLITHIC_BUILD) - set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) -else() - target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT FreeRDPTargets) -endif() - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") - -if(BUILD_TESTING AND NOT WIN32 AND NOT APPLE) - add_subdirectory(test) -endif() - diff --git a/libfreerdp/primitives/test/CMakeLists.txt b/libfreerdp/primitives/test/CMakeLists.txt index 8b7162455..9a652a36a 100644 --- a/libfreerdp/primitives/test/CMakeLists.txt +++ b/libfreerdp/primitives/test/CMakeLists.txt @@ -28,12 +28,7 @@ set(${MODULE_PREFIX}_EXTRA_SRCS add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS} ${${MODULE_PREFIX}_EXTRA_SRCS}) -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-primitives) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/libfreerdp/primitives/test/TestPrimitivesYCoCg.c b/libfreerdp/primitives/test/TestPrimitivesYCoCg.c index c280b5be3..4c6a4b8e4 100644 --- a/libfreerdp/primitives/test/TestPrimitivesYCoCg.c +++ b/libfreerdp/primitives/test/TestPrimitivesYCoCg.c @@ -85,7 +85,7 @@ int test_YCoCgRToRGB_8u_AC4R_func(void) /* ------------------------------------------------------------------------- */ STD_SPEED_TEST( - ycocg_to_rgb_speed, const BYTE, BYTE, PRIM_NOP, + ycocg_to_rgb_speed, BYTE, BYTE, PRIM_NOP, TRUE, general_YCoCgToRGB_8u_AC4R(src1, 64*4, dst, 64*4, 64, 64, 2, FALSE, FALSE), #ifdef WITH_SSE2 TRUE, ssse3_YCoCgRToRGB_8u_AC4R(src1, 64*4, dst, 64*4, 64, 64, 2, FALSE, FALSE), diff --git a/libfreerdp/rail/CMakeLists.txt b/libfreerdp/rail/CMakeLists.txt index 504f7b303..c84d74ba9 100644 --- a/libfreerdp/rail/CMakeLists.txt +++ b/libfreerdp/rail/CMakeLists.txt @@ -18,33 +18,9 @@ set(MODULE_NAME "freerdp-rail") set(MODULE_PREFIX "FREERDP_RAIL") -set(${MODULE_PREFIX}_SRCS +freerdp_module_add( window_list.c window.c icon.c rail.c librail.h) - -add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT" - MONOLITHIC ${MONOLITHIC_BUILD} - SOURCES ${${MODULE_PREFIX}_SRCS} - EXPORT) - -if (WITH_LIBRARY_VERSIONING) - set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) -endif() -set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib") - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL - MODULE freerdp - MODULES freerdp-utils) - -if(MONOLITHIC_BUILD) - set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) -else() - target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT FreeRDPTargets) -endif() - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") diff --git a/libfreerdp/utils/CMakeLists.txt b/libfreerdp/utils/CMakeLists.txt index ad2a419ee..6c0ac2c62 100644 --- a/libfreerdp/utils/CMakeLists.txt +++ b/libfreerdp/utils/CMakeLists.txt @@ -36,41 +36,18 @@ if(NOT WIN32) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} msusb.c) endif() -add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT" - MONOLITHIC ${MONOLITHIC_BUILD} - SOURCES ${${MODULE_PREFIX}_SRCS} - EXPORT) +freerdp_module_add(${${MODULE_PREFIX}_SRCS}) -if (WITH_LIBRARY_VERSIONING) - set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) -endif() -set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib") - -set(${MODULE_PREFIX}_LIBS - ${CMAKE_THREAD_LIBS_INIT} - ${CMAKE_DL_LIBS}) +freerdp_library_add(${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}) if(WIN32) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ws2_32) + freerdp_library_add(ws2_32) endif() if(${CMAKE_SYSTEM_NAME} MATCHES SunOS) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} rt) + freerdp_library_add(rt) endif() -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -if(MONOLITHIC_BUILD) - set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) -else() - target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT FreeRDPTargets) -endif() - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") - - if(BUILD_TESTING) add_subdirectory(test) endif() - diff --git a/libfreerdp/utils/test/CMakeLists.txt b/libfreerdp/utils/test/CMakeLists.txt index ace2867c6..a08ee112d 100644 --- a/libfreerdp/utils/test/CMakeLists.txt +++ b/libfreerdp/utils/test/CMakeLists.txt @@ -13,14 +13,7 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-utils) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} winpr freerdp) set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}") diff --git a/server/Mac/CMakeLists.txt b/server/Mac/CMakeLists.txt index bedd69ec8..4217d5477 100644 --- a/server/Mac/CMakeLists.txt +++ b/server/Mac/CMakeLists.txt @@ -67,12 +67,7 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${IOSURFACE} ${CARBON}) -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-core freerdp-utils freerdp-codec freerdp-primitives) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/server/Sample/CMakeLists.txt b/server/Sample/CMakeLists.txt index 1252e3f7f..6e3b16077 100644 --- a/server/Sample/CMakeLists.txt +++ b/server/Sample/CMakeLists.txt @@ -31,13 +31,7 @@ set(${MODULE_PREFIX}_SRCS add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-server) - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-core freerdp-utils freerdp-codec freerdp-primitives) - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/server/Windows/CMakeLists.txt b/server/Windows/CMakeLists.txt index 013c2a797..93336a5b6 100644 --- a/server/Windows/CMakeLists.txt +++ b/server/Windows/CMakeLists.txt @@ -75,12 +75,7 @@ if(CMAKE_WINDOWS_VERSION STREQUAL "WIN8") endif() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} dsound) -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-server) - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-core freerdp-utils freerdp-codec freerdp-primitives) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-server freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/server/shadow/CMakeLists.txt b/server/shadow/CMakeLists.txt index e68c84589..cf22a2155 100644 --- a/server/shadow/CMakeLists.txt +++ b/server/shadow/CMakeLists.txt @@ -184,14 +184,9 @@ add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME "freerdp-shadow") list(APPEND ${MODULE_PREFIX}_LIBS freerdp-server) - -set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS - MONOLITHIC ${MONOLITHIC_BUILD} - MODULE freerdp - MODULES freerdp-core freerdp-common freerdp-codec freerdp-primitives freerdp-utils freerdp-gdi freerdp-crypto freerdp-locale) - list(APPEND ${MODULE_PREFIX}_LIBS freerdp-client) list(APPEND ${MODULE_PREFIX}_LIBS winpr-makecert-tool winpr) +list(APPEND ${MODULE_PREFIX}_LIBS freerdp) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})