mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[client,sdl] simplify webview build
This commit is contained 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@";
|
||||
|
||||
@@ -68,7 +68,9 @@
|
||||
#include "sdl_touch.hpp"
|
||||
#include "sdl_utils.hpp"
|
||||
|
||||
#if defined(WITH_WEBVIEW)
|
||||
#include <aad/sdl_webview.hpp>
|
||||
#endif
|
||||
|
||||
#define SDL_TAG CLIENT_TAG("SDL")
|
||||
|
||||
|
||||
@@ -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})
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#cmakedefine WITH_WEBVIEW
|
||||
@@ -21,9 +21,6 @@
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
|
||||
#include <sdl_config.hpp>
|
||||
|
||||
#if defined(WITH_WEBVIEW)
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
@@ -35,4 +32,3 @@ extern "C"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -19,18 +19,18 @@
|
||||
|
||||
#include <webview.h>
|
||||
|
||||
#include "webview_impl.hpp"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cctype>
|
||||
#include <map>
|
||||
#include <regex>
|
||||
#include <sstream>
|
||||
#include <cctype>
|
||||
#include <algorithm>
|
||||
#include "../webview_impl.hpp"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <winpr/string.h>
|
||||
#include <freerdp/log.h>
|
||||
#include <winpr/string.h>
|
||||
|
||||
#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
|
||||
@@ -1 +0,0 @@
|
||||
upstream at https://github.com/webview/webview/
|
||||
Reference in New Issue
Block a user