mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
[cmake,channels] unset client/server options
If a channel is deactivated, delete the client and server options (e.g. reset them to default) to avoid having something like CHANNEL_NAME=OFF AND CHANNEL_NAME_CLIENT=ON
This commit is contained in:
@@ -46,6 +46,13 @@ macro(define_channel_options)
|
||||
option(${CHANNEL_OPTION} "${CHANNEL_OPTION_DOC}" ${CHANNEL_DEFAULT})
|
||||
endif()
|
||||
|
||||
# If the channel was enabled before the client/server options will stay ensure
|
||||
# they are deleted if the channel is gone.
|
||||
if(NOT ${CHANNEL_OPTION})
|
||||
unset(${CHANNEL_CLIENT_OPTION} CACHE)
|
||||
unset(${CHANNEL_SERVER_OPTION} CACHE)
|
||||
endif()
|
||||
|
||||
cmake_dependent_option(
|
||||
${CHANNEL_CLIENT_OPTION} "${CHANNEL_CLIENT_OPTION_DOC}" ${CHANNEL_CLIENT_DEFAULT} "${CHANNEL_OPTION}" OFF
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user