Title: [260006] trunk
- Revision
- 260006
- Author
- [email protected]
- Date
- 2020-04-13 08:00:07 -0700 (Mon, 13 Apr 2020)
Log Message
[GTK][CMake] Introduce an USE_GTK4 build option
https://bugs.webkit.org/show_bug.cgi?id=210154
Reviewed by Carlos Garcia Campos.
Do the bare minimum changes to build against GTK4 and produce a WebKit port library with a
different name than GTK3 builds. Note that this does not attempt to make the built artifacts
parallel-installable yet, though at least the main library, headers, and the pkg-config .pc
file should be safe to install. The final names for built artifacts for GTK4 builds may
still change.
* Source/cmake/OptionsGTK.cmake: Add a new USE_GTK4 public build option, which defaults
to FALSE for now, and depending on its value choose the required version of GTK and set
a different API version versions. This is enough to build a library with a different
name (libwebkit2gtk-5.0 vs. libwebkit2gtk-4.0) when GTK4 is in use.
Modified Paths
Diff
Modified: trunk/ChangeLog (260005 => 260006)
--- trunk/ChangeLog 2020-04-13 14:36:12 UTC (rev 260005)
+++ trunk/ChangeLog 2020-04-13 15:00:07 UTC (rev 260006)
@@ -1,3 +1,21 @@
+2020-04-13 Adrian Perez de Castro <[email protected]>
+
+ [GTK][CMake] Introduce an USE_GTK4 build option
+ https://bugs.webkit.org/show_bug.cgi?id=210154
+
+ Reviewed by Carlos Garcia Campos.
+
+ Do the bare minimum changes to build against GTK4 and produce a WebKit port library with a
+ different name than GTK3 builds. Note that this does not attempt to make the built artifacts
+ parallel-installable yet, though at least the main library, headers, and the pkg-config .pc
+ file should be safe to install. The final names for built artifacts for GTK4 builds may
+ still change.
+
+ * Source/cmake/OptionsGTK.cmake: Add a new USE_GTK4 public build option, which defaults
+ to FALSE for now, and depending on its value choose the required version of GTK and set
+ a different API version versions. This is enough to build a library with a different
+ name (libwebkit2gtk-5.0 vs. libwebkit2gtk-4.0) when GTK4 is in use.
+
2020-04-10 Philippe Normand <[email protected]>
[Flatpak SDK] Improved sccache support
Modified: trunk/Source/cmake/OptionsGTK.cmake (260005 => 260006)
--- trunk/Source/cmake/OptionsGTK.cmake 2020-04-13 14:36:12 UTC (rev 260005)
+++ trunk/Source/cmake/OptionsGTK.cmake 2020-04-13 15:00:07 UTC (rev 260006)
@@ -1,10 +1,21 @@
include(GNUInstallDirs)
include(VersioningUtils)
+WEBKIT_OPTION_BEGIN()
+WEBKIT_OPTION_DEFINE(USE_GTK4 "Whether to enable usage of GTK4 instead of GTK3." PUBLIC OFF)
+
SET_PROJECT_VERSION(2 29 0)
-set(WEBKITGTK_API_VERSION 4.0)
-CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT 82 0 45)
+if (USE_GTK4)
+ set(WEBKITGTK_API_VERSION 5.0)
+ set(GTK_MINIMUM_VERSION 3.98.2)
+ CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT 0 0 0)
+else ()
+ set(WEBKITGTK_API_VERSION 4.0)
+ set(GTK_MINIMUM_VERSION 3.22.0)
+ CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT 82 0 45)
+endif ()
+
CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(_javascript_CORE 35 0 17)
# These are shared variables, but we special case their definition so that we can use the
@@ -27,7 +38,7 @@
find_package(Freetype 2.4.2 REQUIRED)
find_package(LibGcrypt 1.6.0 REQUIRED)
find_package(GLIB 2.44.0 REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule)
-find_package(GTK 3.22.0 REQUIRED)
+find_package(GTK ${GTK_MINIMUM_VERSION} REQUIRED)
find_package(HarfBuzz 0.9.18 REQUIRED COMPONENTS ICU)
find_package(ICU 60.2 REQUIRED COMPONENTS data i18n uc)
find_package(JPEG REQUIRED)
@@ -45,8 +56,6 @@
find_package(OpenGL)
find_package(OpenGLES2)
-WEBKIT_OPTION_BEGIN()
-
include(GStreamerDefinitions)
SET_AND_EXPOSE_TO_BUILD(USE_ATK TRUE)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes