Fixed CMake options, define in library that use them. (#7141)

This commit is contained in:
akallabeth 2021-07-01 16:19:12 +02:00 committed by GitHub
parent 5a85a824d2
commit 1c7e3933a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 15 deletions

View File

@ -57,13 +57,10 @@ else()
endif()
if(WIN32 AND NOT UWP)
option(WITH_NATIVE_SSPI "Use native SSPI modules" ON)
option(WITH_WINMM "Use Windows Multimedia" ON)
option(WITH_WIN8 "Use Windows 8 libraries" OFF)
endif()
option(WITH_SMARTCARD_INSPECT "Enable SmartCard API Inspector" OFF)
option(BUILD_TESTING "Build unit tests" OFF)
CMAKE_DEPENDENT_OPTION(TESTS_WTSAPI_EXTRA "Build extra WTSAPI tests (interactive)" OFF "BUILD_TESTING" OFF)
CMAKE_DEPENDENT_OPTION(BUILD_COMM_TESTS "Build comm related tests (require comm port)" OFF "BUILD_TESTING" OFF)
@ -130,10 +127,6 @@ option(WITH_DEBUG_NLA "Print authentication related debug messages." ${DEFAULT_D
if(WITH_DEBUG_NLA)
message(WARNING "WITH_DEBUG_NLA=ON, the build might leak sensitive information, do not use with release builds!")
endif()
option(WITH_DEBUG_NTLM "Print NTLM debug messages" ${DEFAULT_DEBUG_OPTION})
if(WITH_DEBUG_NTLM)
message(WARNING "WITH_DEBUG_NTLM=ON, the build might leak sensitive information, do not use with release builds!")
endif()
option(WITH_DEBUG_TSG "Print Terminal Server Gateway debug messages" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_RAIL "Print RemoteApp debug messages" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_RDP "Print RDP debug messages" ${DEFAULT_DEBUG_OPTION})
@ -145,8 +138,6 @@ option(WITH_DEBUG_SCARD "Print smartcard debug messages" ${DEFAULT_DEBUG_OPTION}
option(WITH_DEBUG_SND "Print rdpsnd debug messages" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_SVC "Print static virtual channel debug messages." ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_TRANSPORT "Print transport debug messages." ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_THREADS "Print thread debug messages, enables handle dump" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_MUTEX "Print mutex debug messages" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_TIMEZONE "Print timezone debug messages." ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_WND "Print window order debug messages" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_X11_CLIPRDR "Print X11 clipboard redirection debug messages" ${DEFAULT_DEBUG_OPTION})
@ -158,7 +149,6 @@ option(WITH_DEBUG_RINGBUFFER "Enable Ringbuffer debug messages" ${DEFAULT_DEBUG_
option(WITH_DEBUG_SYMBOLS "Pack debug symbols to installer" OFF)
option(WITH_CCACHE "Use ccache support if available" ON)
option(WITH_CLANG_FORMAT "Detect clang-format. run 'cmake --build . --target clangformat' to format." ON)
option(WITH_ICU "Use ICU for unicode conversion" OFF)
option(WITH_GSSAPI "Compile support for kerberos authentication. (EXPERIMENTAL)" OFF)
option(WITH_DSP_EXPERIMENTAL "Enable experimental sound encoder/decoder formats" OFF)

View File

@ -28,10 +28,8 @@
#cmakedefine WITH_NEON
#cmakedefine WITH_IPP
#cmakedefine WITH_CUPS
#cmakedefine WITH_NATIVE_SSPI
#cmakedefine WITH_JPEG
#cmakedefine WITH_WIN8
#cmakedefine WITH_ICU
#cmakedefine WITH_RDPSND_DSOUND
#cmakedefine HAVE_MATH_C99_LONG_DOUBLE
@ -137,7 +135,6 @@
#cmakedefine WITH_DEBUG_LICENSE
#cmakedefine WITH_DEBUG_NEGO
#cmakedefine WITH_DEBUG_NLA
#cmakedefine WITH_DEBUG_NTLM
#cmakedefine WITH_DEBUG_TSG
#cmakedefine WITH_DEBUG_RAIL
#cmakedefine WITH_DEBUG_RDP
@ -149,9 +146,7 @@
#cmakedefine WITH_DEBUG_SVC
#cmakedefine WITH_DEBUG_RDPEI
#cmakedefine WITH_DEBUG_TIMEZONE
#cmakedefine WITH_DEBUG_THREADS
#cmakedefine WITH_DEBUG_URBDRC
#cmakedefine WITH_DEBUG_MUTEX
#cmakedefine WITH_DEBUG_TRANSPORT
#cmakedefine WITH_DEBUG_WND
#cmakedefine WITH_DEBUG_X11

View File

@ -33,9 +33,30 @@ if (NOT FREERDP_UNIFIED_BUILD)
endif()
endif()
set(DEFAULT_DEBUG_OPTION OFF)
if (WIN32 AND NOT UWP)
set(NATIVE_SSPI ON)
endif()
option(WITH_VERBOSE_WINPR_ASSERT "Compile with verbose WINPR_ASSERT." ON)
option(WITH_WINPR_TOOLS "Build WinPR helper binaries" ON)
option(WITH_WINPR_DEPRECATED "Build WinPR deprecated symbols" OFF)
option(WITH_DEBUG_THREADS "Print thread debug messages, enables handle dump" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_SYMBOLS "Pack debug symbols to installer" OFF)
option(WITH_NATIVE_SSPI "Use native SSPI modules" ${NATIVE_SSPI})
option(WITH_SMARTCARD_INSPECT "Enable SmartCard API Inspector" OFF)
option(WITH_DEBUG_MUTEX "Print mutex debug messages" ${DEFAULT_DEBUG_OPTION})
option(WITH_ICU "Use ICU for unicode conversion" OFF)
option(WITH_DEBUG_NTLM "Print NTLM debug messages" ${DEFAULT_DEBUG_OPTION})
if(WITH_DEBUG_NTLM)
message(WARNING "WITH_DEBUG_NTLM=ON, the build might leak sensitive information, do not use with release builds!")
endif()
option(WITH_DEBUG_NLA "Print authentication related debug messages." ${DEFAULT_DEBUG_OPTION})
if(WITH_DEBUG_NLA)
message(WARNING "WITH_DEBUG_NLA=ON, the build might leak sensitive information, do not use with release builds!")
endif()
if (WITH_WINPR_DEPRECATED)
add_definitions(-DWITH_WINPR_DEPRECATED)

View File

@ -26,4 +26,11 @@
#cmakedefine HAVE_STRNDUP
#cmakedefine WITH_EVENTFD_READ_WRITE
#cmakedefine WITH_NATIVE_SSPI
#cmakedefine WITH_ICU
#cmakedefine WITH_DEBUG_NTLM
#cmakedefine WITH_DEBUG_THREADS
#cmakedefine WITH_DEBUG_MUTEX
#endif /* WINPR_CONFIG_H */