build tags for supporting webkit2gtk 4.0 and 4.1

This commit is contained in:
Travis McLane
2024-05-08 10:46:03 -05:00
parent 71b2edc0fe
commit 5ffceffbd0
6 changed files with 20 additions and 5 deletions
@@ -4,7 +4,9 @@
package webview
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.1 gio-unix-2.0
#cgo linux pkg-config: gtk+-3.0 gio-unix-2.0
#cgo webkit2_40 pkg-config: webkit2gtk-4.0 libsoup-2.4
#cgo webkit2_41 pkg-config: webkit2gtk-4.1 libsoup-3.0
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
@@ -3,7 +3,9 @@
package webview
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.1 gio-unix-2.0
#cgo linux pkg-config: gtk+-3.0 gio-unix-2.0
#cgo webkit2_40 pkg-config: webkit2gtk-4.0 libsoup-2.4
#cgo webkit2_41 pkg-config: webkit2gtk-4.1 libsoup-3.0
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
+3 -1
View File
@@ -3,7 +3,9 @@
package webview
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.1 libsoup-3.0
#cgo pkg-config: gtk+-3.0
#cgo webkit2_40 pkg-config: webkit2gtk-4.0 libsoup-2.4
#cgo webkit2_41 pkg-config: webkit2gtk-4.1 libsoup-3.0
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
+4 -1
View File
@@ -1,7 +1,10 @@
package operatingsystem
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.1
#cgo linux pkg-config: gtk+-3.0
#cgo webkit2_40 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include <webkit2/webkit2.h>
*/
import "C"
+4
View File
@@ -3,6 +3,10 @@
package application
/*
#cgo linux pkg-config: gtk+-3.0
#cgo webkit2_40 pkg-config: webkit2gtk-4.0 libsoup-2.4
#cgo webkit2_41 pkg-config: webkit2gtk-4.1 libsoup-3.0
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
static guint get_compiled_gtk_major_version() { return GTK_MAJOR_VERSION; }
+3 -1
View File
@@ -15,7 +15,9 @@ import (
)
/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.1 gdk-3.0
#cgo linux pkg-config: gdk-3.0 gtk+-3.0
#cgo webkit2_40 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include <gtk/gtk.h>
#include <gdk/gdk.h>