From 6a2626498b8116a5e9a11bce65c485eb19ab2192 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Thu, 13 Oct 2022 14:16:32 +0200 Subject: [PATCH] Disable channel builds if -DWITH_CHANNEL=OFF --- channels/CMakeLists.txt | 20 +++++++++++--------- include/config/config.h.in | 4 ++++ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/channels/CMakeLists.txt b/channels/CMakeLists.txt index e0d8d478e..c52e7da34 100644 --- a/channels/CMakeLists.txt +++ b/channels/CMakeLists.txt @@ -268,14 +268,16 @@ foreach(FILEPATH ${FILEPATHS}) endif() endforeach(FILEPATH) -if(WITH_CLIENT_CHANNELS) - add_subdirectory(client) - set(FREERDP_CHANNELS_CLIENT_SRCS ${FREERDP_CHANNELS_CLIENT_SRCS} PARENT_SCOPE) - set(FREERDP_CHANNELS_CLIENT_LIBS ${FREERDP_CHANNELS_CLIENT_LIBS} PARENT_SCOPE) -endif() +if (WITH_CHANNELS) + if(WITH_CLIENT_CHANNELS) + add_subdirectory(client) + set(FREERDP_CHANNELS_CLIENT_SRCS ${FREERDP_CHANNELS_CLIENT_SRCS} PARENT_SCOPE) + set(FREERDP_CHANNELS_CLIENT_LIBS ${FREERDP_CHANNELS_CLIENT_LIBS} PARENT_SCOPE) + endif() -if(WITH_SERVER_CHANNELS) - add_subdirectory(server) - set(FREERDP_CHANNELS_SERVER_SRCS ${FREERDP_CHANNELS_SERVER_SRCS} PARENT_SCOPE) - set(FREERDP_CHANNELS_SERVER_LIBS ${FREERDP_CHANNELS_SERVER_LIBS} PARENT_SCOPE) + if(WITH_SERVER_CHANNELS) + add_subdirectory(server) + set(FREERDP_CHANNELS_SERVER_SRCS ${FREERDP_CHANNELS_SERVER_SRCS} PARENT_SCOPE) + set(FREERDP_CHANNELS_SERVER_LIBS ${FREERDP_CHANNELS_SERVER_LIBS} PARENT_SCOPE) + endif() endif() diff --git a/include/config/config.h.in b/include/config/config.h.in index 6ce58f044..d80d3fe22 100644 --- a/include/config/config.h.in +++ b/include/config/config.h.in @@ -50,6 +50,10 @@ #cmakedefine WITH_VAAPI +#cmakedefine WITH_CHANNELS +#cmakedefine WITH_CLIENT_CHANNELS +#cmakedefine WITH_SERVER_CHANNELS + #cmakedefine WITH_CHANNEL_GFXREDIR #cmakedefine WITH_CHANNEL_RDPAPPLIST