diff --git a/client/SDL/aad/CMakeLists.txt b/client/SDL/aad/CMakeLists.txt index c77027cb8..c2b0620f0 100644 --- a/client/SDL/aad/CMakeLists.txt +++ b/client/SDL/aad/CMakeLists.txt @@ -1,10 +1,7 @@ -option(WITH_WEBVIEW "Build with WebView support for AAD login popup browser" OFF) +option(WITH_WEBVIEW "Build with WebView support for AAD login popup browser" ON) if (WITH_WEBVIEW) option(WITH_WEBVIEW_QT "Build with QtWebEngine support for AAD login broweser popup" OFF) - set(DEFINITIONS - -DWITH_WEBVIEW - ) set(SRCS sdl_webview.hpp webview_impl.hpp @@ -56,9 +53,12 @@ else() ) endif() +configure_file(sdl_config.hpp.in sdl_config.hpp @ONLY) + add_library(aad-view STATIC ${SRCS} ) +target_include_directories(aad-view PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(aad-view PRIVATE ${LIBS} diff --git a/client/SDL/aad/sdl_config.hpp.in b/client/SDL/aad/sdl_config.hpp.in new file mode 100644 index 000000000..34d075180 --- /dev/null +++ b/client/SDL/aad/sdl_config.hpp.in @@ -0,0 +1,3 @@ +#pragma once + +#cmakedefine WITH_WEBVIEW diff --git a/client/SDL/aad/sdl_webview.hpp b/client/SDL/aad/sdl_webview.hpp index 8ece62d25..49461d69a 100644 --- a/client/SDL/aad/sdl_webview.hpp +++ b/client/SDL/aad/sdl_webview.hpp @@ -21,6 +21,9 @@ #include +#include + +#if defined(WITH_WEBVIEW) #ifdef __cplusplus extern "C" { @@ -32,3 +35,4 @@ extern "C" #ifdef __cplusplus } #endif +#endif diff --git a/client/SDL/sdl_freerdp.cpp b/client/SDL/sdl_freerdp.cpp index 3cf405a7e..0e5b36cc0 100644 --- a/client/SDL/sdl_freerdp.cpp +++ b/client/SDL/sdl_freerdp.cpp @@ -56,9 +56,7 @@ #include "sdl_pointer.hpp" #include "dialogs/sdl_dialogs.hpp" -#ifdef WITH_WEBVIEW #include "aad/sdl_webview.hpp" -#endif #define SDL_TAG CLIENT_TAG("SDL")