[cmake] WITH_WEBVIEW new defaults

* Enable by default now
* Use a config file to detect if it is enabled
This commit is contained in:
akallabeth 2023-08-03 09:36:10 +02:00 committed by akallabeth
parent 10ea529f70
commit 0e458c8c2c
4 changed files with 11 additions and 6 deletions

View File

@ -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}

View File

@ -0,0 +1,3 @@
#pragma once
#cmakedefine WITH_WEBVIEW

View File

@ -21,6 +21,9 @@
#include <freerdp/freerdp.h>
#include <sdl_config.hpp>
#if defined(WITH_WEBVIEW)
#ifdef __cplusplus
extern "C"
{
@ -32,3 +35,4 @@ extern "C"
#ifdef __cplusplus
}
#endif
#endif

View File

@ -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")