diff --git a/channels/urbdrc/CMakeLists.txt b/channels/urbdrc/CMakeLists.txt index bc570e0ae..0030e277d 100644 --- a/channels/urbdrc/CMakeLists.txt +++ b/channels/urbdrc/CMakeLists.txt @@ -21,7 +21,7 @@ include_directories(common) add_subdirectory(common) if(WITH_CLIENT_CHANNELS) - option(WITH_DEBUG_URBDRC "Dump data send/received in URBDRC channel" OFF) + option(WITH_DEBUG_URBDRC "Dump data send/received in URBDRC channel" ${DEFAULT_DEBUG_OPTION}) find_package(libusb-1.0 REQUIRED) include_directories(${LIBUSB_1_INCLUDE_DIRS}) diff --git a/client/SDL/CMakeLists.txt b/client/SDL/CMakeLists.txt index 83e27aa73..234d55b5c 100644 --- a/client/SDL/CMakeLists.txt +++ b/client/SDL/CMakeLists.txt @@ -40,8 +40,8 @@ include(CommonConfigOptions) include(ConfigureFreeRDP) -option(WITH_DEBUG_SDL_EVENTS "[dangerous, not for release builds!] Debug SDL events" OFF) -option(WITH_DEBUG_SDL_KBD_EVENTS "[dangerous, not for release builds!] Debug SDL keyboard events" OFF) +option(WITH_DEBUG_SDL_EVENTS "[dangerous, not for release builds!] Debug SDL events" ${DEFAULT_DEBUG_OPTION}) +option(WITH_DEBUG_SDL_KBD_EVENTS "[dangerous, not for release builds!] Debug SDL keyboard events" ${DEFAULT_DEBUG_OPTION}) option(WITH_WIN_CONSOLE "Build ${PROJECT_NAME} with console support" ON) option(WITH_SDL_LINK_SHARED "link SDL dynamic or static" ON) diff --git a/cmake/ConfigOptions.cmake b/cmake/ConfigOptions.cmake index 9515ef05d..ce451c600 100644 --- a/cmake/ConfigOptions.cmake +++ b/cmake/ConfigOptions.cmake @@ -86,9 +86,9 @@ option(WITH_DEBUG_ALL "Print all debug messages." OFF) if(WITH_DEBUG_ALL) message(WARNING "WITH_DEBUG_ALL=ON, the build will be slow and might leak sensitive information, do not use with release builds!") - set(DEFAULT_DEBUG_OPTION "ON") + set(DEFAULT_DEBUG_OPTION ON CACHE INTERNAL "debug default") else() - set(DEFAULT_DEBUG_OPTION "OFF") + set(DEFAULT_DEBUG_OPTION OFF CACHE INTERNAL "debug default") endif() option(WITH_DEBUG_CERTIFICATE "Print certificate related debug messages." ${DEFAULT_DEBUG_OPTION}) diff --git a/winpr/CMakeLists.txt b/winpr/CMakeLists.txt index 929fb6428..488a02cf6 100644 --- a/winpr/CMakeLists.txt +++ b/winpr/CMakeLists.txt @@ -47,10 +47,14 @@ if (NOT FREERDP_UNIFIED_BUILD) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") endif() endif() + if(WITH_DEBUG_ALL) + message(WARNING "WITH_DEBUG_ALL=ON, the build will be slow and might leak sensitive information, do not use with release builds!") + set(DEFAULT_DEBUG_OPTION "ON" CACHE INTERNAL "debug default") + else() + set(DEFAULT_DEBUG_OPTION "OFF" CACHE INTERNAL "debug default") + endif() endif() -set(DEFAULT_DEBUG_OPTION OFF) - if (WIN32 AND NOT UWP) set(NATIVE_SSPI ON) endif() diff --git a/winpr/libwinpr/sspi/CMakeLists.txt b/winpr/libwinpr/sspi/CMakeLists.txt index 0ddd3fad4..f77b38ff1 100644 --- a/winpr/libwinpr/sspi/CMakeLists.txt +++ b/winpr/libwinpr/sspi/CMakeLists.txt @@ -60,7 +60,7 @@ if (NOT WIN32 AND NOT ANDROID AND NOT IOS AND NOT APPLE) set(KRB5_DEFAULT ON) endif() -option(WITH_DEBUG_SCHANNEL "Compile support for SCHANNEL debug" OFF) +option(WITH_DEBUG_SCHANNEL "Compile support for SCHANNEL debug" ${DEFAULT_DEBUG_OPTION}) if (WITH_DEBUG_SCHANNEL) winpr_definition_add("-DWITH_DEBUG_SCHANNEL") endif()