From c3a82daad637b13671ecca8e7ce1ee4224b53be9 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Mon, 20 Feb 2023 10:24:38 +0100 Subject: [PATCH] [channels] simplified client linking --- channels/CMakeLists.txt | 11 +++++------ channels/ainput/client/CMakeLists.txt | 10 ++++++---- channels/audin/client/CMakeLists.txt | 11 ++++++----- channels/cliprdr/client/CMakeLists.txt | 9 ++++----- channels/disp/client/CMakeLists.txt | 14 +++++--------- channels/drdynvc/client/CMakeLists.txt | 6 ++---- channels/drive/client/CMakeLists.txt | 10 +++++----- channels/echo/client/CMakeLists.txt | 9 +++++---- channels/encomsp/client/CMakeLists.txt | 6 ++---- channels/geometry/client/CMakeLists.txt | 16 ++++++---------- channels/parallel/client/CMakeLists.txt | 10 +++++----- channels/printer/client/CMakeLists.txt | 15 +++++++-------- channels/rail/client/CMakeLists.txt | 17 +++++++---------- channels/rdp2tcp/client/CMakeLists.txt | 10 +++++----- channels/rdpdr/client/CMakeLists.txt | 19 +++++++++---------- channels/rdpei/client/CMakeLists.txt | 11 ++++++----- channels/rdpgfx/client/CMakeLists.txt | 10 +++++----- channels/rdpsnd/client/CMakeLists.txt | 9 ++++----- channels/remdesk/client/CMakeLists.txt | 14 ++++++-------- channels/serial/client/CMakeLists.txt | 10 +++++----- channels/smartcard/client/CMakeLists.txt | 18 +++++++++--------- channels/sshagent/client/CMakeLists.txt | 10 ++++++---- channels/tsmf/client/CMakeLists.txt | 12 +++++------- channels/urbdrc/client/CMakeLists.txt | 22 +++++++++------------- channels/video/client/CMakeLists.txt | 12 +++++------- 25 files changed, 139 insertions(+), 162 deletions(-) diff --git a/channels/CMakeLists.txt b/channels/CMakeLists.txt index 1bfc1a2c5..3b1e1d90b 100644 --- a/channels/CMakeLists.txt +++ b/channels/CMakeLists.txt @@ -186,15 +186,14 @@ macro(add_channel_client_library _module_prefix _module_name _channel_name _dyna set(${_module_prefix}_NAME ${_module_name} PARENT_SCOPE) set(${_module_prefix}_CHANNEL ${_channel_name} PARENT_SCOPE) set(${_module_prefix}_ENTRY ${_entry} PARENT_SCOPE) - add_library(${_module_name} STATIC ${${_module_prefix}_SRCS}) - if (${${_module_prefix}_LIBS}) + add_library(${_module_name} OBJECT ${${_module_prefix}_SRCS}) + set_property(TARGET ${_module_name} PROPERTY POSITION_INDEPENDENT_CODE ON) + set_property(TARGET ${_module_name} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") + + if (${_module_prefix}_LIBS) target_link_libraries(${_module_name} PRIVATE ${${_module_prefix}_LIBS}) endif() - - if (NOT BUILD_SHARED_LIBS) - client_channel_install(${_module_name} ${FREERDP_ADDIN_PATH}) - endif() endmacro(add_channel_client_library) macro(add_channel_client_subsystem_library _module_prefix _module_name _channel_name _type _dynamic _entry) diff --git a/channels/ainput/client/CMakeLists.txt b/channels/ainput/client/CMakeLists.txt index 77d17972c..00c8e4acd 100644 --- a/channels/ainput/client/CMakeLists.txt +++ b/channels/ainput/client/CMakeLists.txt @@ -20,11 +20,13 @@ define_channel_client("ainput") set(${MODULE_PREFIX}_SRCS ainput_main.c - ainput_main.h) + ainput_main.h +) + +set(${MODULE_PREFIX}_LIBS + winpr +) include_directories(..) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry") - -target_link_libraries(${MODULE_NAME} winpr) -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/audin/client/CMakeLists.txt b/channels/audin/client/CMakeLists.txt index 9a35bb32e..043e1b5ce 100644 --- a/channels/audin/client/CMakeLists.txt +++ b/channels/audin/client/CMakeLists.txt @@ -19,16 +19,17 @@ define_channel_client("audin") set(${MODULE_PREFIX}_SRCS audin_main.c - audin_main.h) + audin_main.h +) + +set(${MODULE_PREFIX}_LIBS + freerdp winpr +) include_directories(..) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry") -target_link_libraries(${MODULE_NAME} freerdp winpr) - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") - if(WITH_OSS) add_channel_client_subsystem(${MODULE_PREFIX} ${CHANNEL_NAME} "oss" "") endif() diff --git a/channels/cliprdr/client/CMakeLists.txt b/channels/cliprdr/client/CMakeLists.txt index 4511e080c..57819f0e2 100644 --- a/channels/cliprdr/client/CMakeLists.txt +++ b/channels/cliprdr/client/CMakeLists.txt @@ -24,10 +24,9 @@ set(${MODULE_PREFIX}_SRCS cliprdr_main.h ../cliprdr_common.h ../cliprdr_common.c - ) +) +set(${MODULE_PREFIX}_LIBS + winpr freerdp +) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx") - -set(${MODULE_PREFIX}_LIBS freerdp winpr) - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/disp/client/CMakeLists.txt b/channels/disp/client/CMakeLists.txt index b22b3ab1f..d1e1f98f9 100644 --- a/channels/disp/client/CMakeLists.txt +++ b/channels/disp/client/CMakeLists.txt @@ -21,16 +21,12 @@ set(${MODULE_PREFIX}_SRCS disp_main.c disp_main.h ../disp_common.c - ../disp_common.h) + ../disp_common.h +) +set(${MODULE_PREFIX}_LIBS + winpr +) include_directories(..) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry") - - - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/drdynvc/client/CMakeLists.txt b/channels/drdynvc/client/CMakeLists.txt index abf91853c..7f8f04a9e 100644 --- a/channels/drdynvc/client/CMakeLists.txt +++ b/channels/drdynvc/client/CMakeLists.txt @@ -19,9 +19,7 @@ define_channel_client("drdynvc") set(${MODULE_PREFIX}_SRCS drdynvc_main.c - drdynvc_main.h) + drdynvc_main.h +) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx") - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") - diff --git a/channels/drive/client/CMakeLists.txt b/channels/drive/client/CMakeLists.txt index d4821c1e7..a236f7634 100644 --- a/channels/drive/client/CMakeLists.txt +++ b/channels/drive/client/CMakeLists.txt @@ -20,10 +20,10 @@ define_channel_client("drive") set(${MODULE_PREFIX}_SRCS drive_file.c drive_file.h - drive_main.c) + drive_main.c +) +set(${MODULE_PREFIX}_LIBS + winpr freerdp +) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DeviceServiceEntry") - -target_link_libraries(${MODULE_NAME} winpr freerdp) - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/echo/client/CMakeLists.txt b/channels/echo/client/CMakeLists.txt index 1a6b32357..a66443dd4 100644 --- a/channels/echo/client/CMakeLists.txt +++ b/channels/echo/client/CMakeLists.txt @@ -19,11 +19,12 @@ define_channel_client("echo") set(${MODULE_PREFIX}_SRCS echo_main.c - echo_main.h) + echo_main.h +) +set(${MODULE_PREFIX}_LIBS + winpr +) include_directories(..) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry") - -target_link_libraries(${MODULE_NAME} winpr) -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/encomsp/client/CMakeLists.txt b/channels/encomsp/client/CMakeLists.txt index 92ee1f841..59eaa8f16 100644 --- a/channels/encomsp/client/CMakeLists.txt +++ b/channels/encomsp/client/CMakeLists.txt @@ -21,9 +21,7 @@ include_directories(..) set(${MODULE_PREFIX}_SRCS encomsp_main.c - encomsp_main.h) + encomsp_main.h +) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx") - - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/geometry/client/CMakeLists.txt b/channels/geometry/client/CMakeLists.txt index 45efa58fd..b069bb17e 100644 --- a/channels/geometry/client/CMakeLists.txt +++ b/channels/geometry/client/CMakeLists.txt @@ -19,17 +19,13 @@ define_channel_client("geometry") set(${MODULE_PREFIX}_SRCS geometry_main.c - geometry_main.h) + geometry_main.h +) + +set(${MODULE_PREFIX}_LIBS + winpr +) include_directories(..) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry") - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) -if (NOT BUILD_SHARED_LIBS) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client) -endif() - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/parallel/client/CMakeLists.txt b/channels/parallel/client/CMakeLists.txt index 38285f974..d783ead53 100644 --- a/channels/parallel/client/CMakeLists.txt +++ b/channels/parallel/client/CMakeLists.txt @@ -18,10 +18,10 @@ define_channel_client("parallel") set(${MODULE_PREFIX}_SRCS - parallel_main.c) + parallel_main.c +) +set(${MODULE_PREFIX}_LIBS + winpr freerdp +) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DeviceServiceEntry") - -target_link_libraries(${MODULE_NAME} freerdp winpr) - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/printer/client/CMakeLists.txt b/channels/printer/client/CMakeLists.txt index 91988e497..e7bab091d 100644 --- a/channels/printer/client/CMakeLists.txt +++ b/channels/printer/client/CMakeLists.txt @@ -18,19 +18,18 @@ define_channel_client("printer") set(${MODULE_PREFIX}_SRCS - printer_main.c) + printer_main.c +) +set(${MODULE_PREFIX}_LIBS + winpr freerdp +) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DeviceServiceEntry") -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") - if(WITH_CUPS) - add_channel_client_subsystem(${MODULE_PREFIX} ${CHANNEL_NAME} "cups" "") + add_channel_client_subsystem(${MODULE_PREFIX} ${CHANNEL_NAME} "cups" "") endif() if(WIN32 AND NOT UWP) - add_channel_client_subsystem(${MODULE_PREFIX} ${CHANNEL_NAME} "win" "") + add_channel_client_subsystem(${MODULE_PREFIX} ${CHANNEL_NAME} "win" "") endif() diff --git a/channels/rail/client/CMakeLists.txt b/channels/rail/client/CMakeLists.txt index c87fd2f9b..cddf9b74d 100644 --- a/channels/rail/client/CMakeLists.txt +++ b/channels/rail/client/CMakeLists.txt @@ -18,18 +18,15 @@ define_channel_client("rail") set(${MODULE_PREFIX}_SRCS - ../rail_common.h - ../rail_common.c + ../rail_common.h + ../rail_common.c rail_main.c rail_main.h rail_orders.c - rail_orders.h) + rail_orders.h +) +set(${MODULE_PREFIX}_LIBS + freerdp +) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx") - - - -target_link_libraries(${MODULE_NAME} freerdp) - - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/rdp2tcp/client/CMakeLists.txt b/channels/rdp2tcp/client/CMakeLists.txt index 2e510200e..f7bdd20e2 100644 --- a/channels/rdp2tcp/client/CMakeLists.txt +++ b/channels/rdp2tcp/client/CMakeLists.txt @@ -18,10 +18,10 @@ define_channel_client("rdp2tcp") set(${MODULE_PREFIX}_SRCS - rdp2tcp_main.c) + rdp2tcp_main.c +) +set(${MODULE_PREFIX}_LIBS + freerdp +) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "VirtualChannelEntryEx") - -target_link_libraries(${MODULE_NAME} freerdp) - -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 e41cc3c25..7d1157425 100644 --- a/channels/rdpdr/client/CMakeLists.txt +++ b/channels/rdpdr/client/CMakeLists.txt @@ -27,17 +27,16 @@ set(${MODULE_PREFIX}_SRCS rdpdr_main.c rdpdr_main.h rdpdr_capabilities.c - rdpdr_capabilities.h) + rdpdr_capabilities.h +) -add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx") - - - -target_link_libraries(${MODULE_NAME} winpr freerdp) +set(${MODULE_PREFIX}_LIBS + winpr freerdp +) if(APPLE AND (NOT IOS)) find_library(CORESERVICES_LIBRARY CoreServices) - target_link_libraries(${MODULE_NAME} ${CORESERVICES_LIBRARY}) + list(APPEND ${MODULE_PREFIX}_LIBS + ${CORESERVICES_LIBRARY} + ) endif() - - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") +add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx") diff --git a/channels/rdpei/client/CMakeLists.txt b/channels/rdpei/client/CMakeLists.txt index b4d551b5e..8ef47124d 100644 --- a/channels/rdpei/client/CMakeLists.txt +++ b/channels/rdpei/client/CMakeLists.txt @@ -21,11 +21,12 @@ set(${MODULE_PREFIX}_SRCS rdpei_main.c rdpei_main.h ../rdpei_common.c - ../rdpei_common.h) + ../rdpei_common.h +) +set(${MODULE_PREFIX}_LIBS + winpr freerdp +) include_directories(..) + add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry") - -target_link_libraries(${MODULE_NAME} winpr freerdp) - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/rdpgfx/client/CMakeLists.txt b/channels/rdpgfx/client/CMakeLists.txt index a1005825d..3338f981b 100644 --- a/channels/rdpgfx/client/CMakeLists.txt +++ b/channels/rdpgfx/client/CMakeLists.txt @@ -23,13 +23,13 @@ set(${MODULE_PREFIX}_SRCS rdpgfx_codec.c rdpgfx_codec.h ../rdpgfx_common.c - ../rdpgfx_common.h) + ../rdpgfx_common.h +) +set(${MODULE_PREFIX}_LIBS + winpr freerdp +) include_directories(..) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry") -target_link_libraries(${MODULE_NAME} winpr freerdp) - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") - diff --git a/channels/rdpsnd/client/CMakeLists.txt b/channels/rdpsnd/client/CMakeLists.txt index 700bdfd74..4c8c639e7 100644 --- a/channels/rdpsnd/client/CMakeLists.txt +++ b/channels/rdpsnd/client/CMakeLists.txt @@ -19,15 +19,14 @@ define_channel_client("rdpsnd") set(${MODULE_PREFIX}_SRCS rdpsnd_main.c - rdpsnd_main.h) + rdpsnd_main.h +) -add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx;DVCPluginEntry") - -target_link_libraries(${MODULE_NAME} +set(${MODULE_PREFIX}_LIBS winpr freerdp ${CMAKE_THREAD_LIBS_INIT} rdpsnd-common ) -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") +add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx;DVCPluginEntry") if(WITH_OSS) add_channel_client_subsystem(${MODULE_PREFIX} ${CHANNEL_NAME} "oss" "") diff --git a/channels/remdesk/client/CMakeLists.txt b/channels/remdesk/client/CMakeLists.txt index bb66f6ea9..77decc9e3 100644 --- a/channels/remdesk/client/CMakeLists.txt +++ b/channels/remdesk/client/CMakeLists.txt @@ -19,13 +19,11 @@ define_channel_client("remdesk") set(${MODULE_PREFIX}_SRCS remdesk_main.c - remdesk_main.h) + remdesk_main.h +) + +set(${MODULE_PREFIX}_LIBS + winpr freerdp +) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx") - - - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) - - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/serial/client/CMakeLists.txt b/channels/serial/client/CMakeLists.txt index 89065b534..ad7e37973 100644 --- a/channels/serial/client/CMakeLists.txt +++ b/channels/serial/client/CMakeLists.txt @@ -18,10 +18,10 @@ define_channel_client("serial") set(${MODULE_PREFIX}_SRCS - serial_main.c) + serial_main.c +) +set(${MODULE_PREFIX}_LIBS + winpr freerdp +) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DeviceServiceEntry") - -target_link_libraries(${MODULE_NAME} winpr freerdp) - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") diff --git a/channels/smartcard/client/CMakeLists.txt b/channels/smartcard/client/CMakeLists.txt index 79ebb7168..08ce6af27 100644 --- a/channels/smartcard/client/CMakeLists.txt +++ b/channels/smartcard/client/CMakeLists.txt @@ -19,15 +19,15 @@ define_channel_client("smartcard") set(${MODULE_PREFIX}_SRCS smartcard_main.c - smartcard_main.h - ) + smartcard_main.h +) -add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "DeviceServiceEntry") - -target_link_libraries(${MODULE_NAME} winpr freerdp ${OPENSSL_LIBRARIES}) +set(${MODULE_PREFIX}_LIBS + winpr freerdp ${OPENSSL_LIBRARIES} +) if (WITH_SMARTCARD_EMULATE) - target_link_libraries(${MODULE_NAME} ZLIB::ZLIB) + list(APPEND ${MODULE_PREFIX}_LIBS + ZLIB::ZLIB + ) endif() - - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") +add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "DeviceServiceEntry") diff --git a/channels/sshagent/client/CMakeLists.txt b/channels/sshagent/client/CMakeLists.txt index 7966edc93..daad10647 100644 --- a/channels/sshagent/client/CMakeLists.txt +++ b/channels/sshagent/client/CMakeLists.txt @@ -20,11 +20,13 @@ define_channel_client("sshagent") set(${MODULE_PREFIX}_SRCS sshagent_main.c - sshagent_main.h) + sshagent_main.h +) + +set(${MODULE_PREFIX}_LIBS + winpr +) include_directories(..) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry") - -target_link_libraries(${MODULE_NAME} winpr) -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 ba9a6deb2..c3c9898bf 100644 --- a/channels/tsmf/client/CMakeLists.txt +++ b/channels/tsmf/client/CMakeLists.txt @@ -69,18 +69,16 @@ set(${MODULE_PREFIX}_SRCS tsmf_main.h tsmf_media.c tsmf_media.h - tsmf_types.h) + tsmf_types.h +) +set(${MODULE_PREFIX}_LIBS + winpr freerdp +) include_directories(..) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry") - - -target_link_libraries(${MODULE_NAME} freerdp winpr) - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") - if(WITH_VIDEO_FFMPEG) add_channel_client_subsystem(${MODULE_PREFIX} ${CHANNEL_NAME} "ffmpeg" "decoder") endif() diff --git a/channels/urbdrc/client/CMakeLists.txt b/channels/urbdrc/client/CMakeLists.txt index a2d48f03c..a8d7acc8a 100644 --- a/channels/urbdrc/client/CMakeLists.txt +++ b/channels/urbdrc/client/CMakeLists.txt @@ -23,21 +23,17 @@ set(${MODULE_PREFIX}_SRCS data_transfer.h urbdrc_main.c urbdrc_main.h - $ - ) +) + +set(${MODULE_PREFIX}_LIBS + winpr freerdp + $ +) +if (UDEV_FOUND AND UDEV_LIBRARIES) + list(APPEND ${MODULE_PREFIX}_LIBS ${UDEV_LIBRARIES}) +endif() add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry") -set(${MODULE_PREFIX}_LIBS) -if (UDEV_FOUND AND UDEV_LIBRARIES) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${UDEV_LIBRARIES}) -endif() - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) - -target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWOARD} ${${MODULE_PREFIX}_LIBS}) - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client") - # libusb subsystem add_channel_client_subsystem(${MODULE_PREFIX} ${CHANNEL_NAME} "libusb" "") diff --git a/channels/video/client/CMakeLists.txt b/channels/video/client/CMakeLists.txt index 3b2e078de..68d3e3181 100644 --- a/channels/video/client/CMakeLists.txt +++ b/channels/video/client/CMakeLists.txt @@ -19,14 +19,12 @@ define_channel_client("video") set(${MODULE_PREFIX}_SRCS video_main.c - video_main.h) + video_main.h +) +set(${MODULE_PREFIX}_LIBS + winpr +) include_directories(..) add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry") - -set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) - -target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")