Skip to content

Commit

Permalink
fix: define webkit old used only when version < 2.40 (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekmedia authored Jun 3, 2024
1 parent 0875a56 commit 22bf4e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/desktop_webview_window/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ set(PLUGIN_NAME "desktop_webview_window_plugin")
find_package(PkgConfig REQUIRED)
pkg_check_modules(WebKit IMPORTED_TARGET webkit2gtk-4.1)
if (NOT WebKit_FOUND)
add_compile_definitions(WEBKIT_OLD_USED=1)
pkg_check_modules(WebKit REQUIRED IMPORTED_TARGET webkit2gtk-4.0) # for backward compatibility
endif ()

Expand Down
4 changes: 4 additions & 0 deletions packages/desktop_webview_window/linux/webview_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

#include "message_channel_plugin.h"

#if WEBKIT_MAJOR_VERSION < 2 || (WEBKIT_MAJOR_VERSION == 2 && WEBKIT_MINOR_VERSION < 40)
#define WEBKIT_OLD_USED
#endif

namespace
{

Expand Down

0 comments on commit 22bf4e6

Please sign in to comment.