diff --git a/client/SDL/SDL3/sdl_config.hpp.in b/client/SDL/SDL3/sdl_config.hpp.in index a8742fc29..97ee81a15 100644 --- a/client/SDL/SDL3/sdl_config.hpp.in +++ b/client/SDL/SDL3/sdl_config.hpp.in @@ -19,6 +19,8 @@ */ #pragma once +#cmakedefine WITH_WEBVIEW + static const char SDL_CLIENT_NAME[] = "@SDL_CLIENT_BINARY_NAME@"; static const char SDL_CLIENT_VERSION[] = "@FREERDP_VERSION_FULL@ (@GIT_REVISION@)"; static const char SDL_CLIENT_VENDOR[] = "@VENDOR@"; diff --git a/client/SDL/SDL3/sdl_freerdp.cpp b/client/SDL/SDL3/sdl_freerdp.cpp index 439062121..fdd504047 100644 --- a/client/SDL/SDL3/sdl_freerdp.cpp +++ b/client/SDL/SDL3/sdl_freerdp.cpp @@ -68,7 +68,9 @@ #include "sdl_touch.hpp" #include "sdl_utils.hpp" +#if defined(WITH_WEBVIEW) #include +#endif #define SDL_TAG CLIENT_TAG("SDL") diff --git a/client/SDL/common/aad/CMakeLists.txt b/client/SDL/common/aad/CMakeLists.txt index ee08a8ce4..e296f2815 100644 --- a/client/SDL/common/aad/CMakeLists.txt +++ b/client/SDL/common/aad/CMakeLists.txt @@ -38,19 +38,18 @@ if(WITH_WEBVIEW) FetchContent_Declare(webview GIT_REPOSITORY https://github.com/akallabeth/webview GIT_TAG navigation-listener SYSTEM) FetchContent_MakeAvailable(webview) - list(APPEND SRCS wrapper/webview_impl.cpp) + list(APPEND SRCS webview_impl.cpp) list(APPEND LIBS webview::core) + + include_directories(${CMAKE_CURRENT_BINARY_DIR}) + + add_library(sdl-common-aad-view STATIC ${SRCS}) + set_property(TARGET sdl-common-aad-view PROPERTY FOLDER "Client/SDL/Common") + + target_include_directories(sdl-common-aad-view PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) + target_link_libraries(sdl-common-aad-view PRIVATE ${LIBS}) + target_compile_definitions(sdl-common-aad-view PUBLIC ${DEFINITIONS}) else() - set(SRCS dummy.cpp) + add_library(sdl-common-aad-view STATIC dummy.cpp) endif() - -cleaning_configure_file(sdl_config.hpp.in sdl_config.hpp @ONLY) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - -add_library(sdl-common-aad-view STATIC ${SRCS}) -set_property(TARGET sdl-common-aad-view PROPERTY FOLDER "Client/SDL/Common") - -target_include_directories(sdl-common-aad-view PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) -target_link_libraries(sdl-common-aad-view PRIVATE ${LIBS}) -target_compile_definitions(sdl-common-aad-view PUBLIC ${DEFINITIONS}) diff --git a/client/SDL/common/aad/sdl_config.hpp.in b/client/SDL/common/aad/sdl_config.hpp.in deleted file mode 100644 index 34d075180..000000000 --- a/client/SDL/common/aad/sdl_config.hpp.in +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#cmakedefine WITH_WEBVIEW diff --git a/client/SDL/common/aad/sdl_webview.hpp b/client/SDL/common/aad/sdl_webview.hpp index 49461d69a..8ece62d25 100644 --- a/client/SDL/common/aad/sdl_webview.hpp +++ b/client/SDL/common/aad/sdl_webview.hpp @@ -21,9 +21,6 @@ #include -#include - -#if defined(WITH_WEBVIEW) #ifdef __cplusplus extern "C" { @@ -35,4 +32,3 @@ extern "C" #ifdef __cplusplus } #endif -#endif diff --git a/client/SDL/common/aad/wrapper/webview_impl.cpp b/client/SDL/common/aad/webview_impl.cpp similarity index 96% rename from client/SDL/common/aad/wrapper/webview_impl.cpp rename to client/SDL/common/aad/webview_impl.cpp index 89358e4b8..d4bfe4f50 100644 --- a/client/SDL/common/aad/wrapper/webview_impl.cpp +++ b/client/SDL/common/aad/webview_impl.cpp @@ -19,18 +19,18 @@ #include +#include "webview_impl.hpp" +#include #include -#include -#include +#include #include #include #include -#include -#include -#include "../webview_impl.hpp" +#include +#include -#include #include +#include #define TAG FREERDP_TAG("client.SDL.common.aad") @@ -43,7 +43,9 @@ class fkt_arg auto redir = args.find("redirect_uri"); if (redir == args.end()) { - WLog_ERR(TAG, "[Webview] url %s does not contain a redirect_uri parameter, aborting.", + WLog_ERR(TAG, + "[Webview] url %s does not contain a redirect_uri parameter, " + "aborting.", url.c_str()); } else diff --git a/client/SDL/common/aad/wrapper/README b/client/SDL/common/aad/wrapper/README deleted file mode 100644 index da906bac6..000000000 --- a/client/SDL/common/aad/wrapper/README +++ /dev/null @@ -1 +0,0 @@ -upstream at https://github.com/webview/webview/