Title: [278753] trunk
Revision
278753
Author
clo...@igalia.com
Date
2021-06-10 21:52:23 -0700 (Thu, 10 Jun 2021)

Log Message

[CMake][GTK][WPE] Improve error message when libsoup3 is not found
https://bugs.webkit.org/show_bug.cgi?id=226905

Reviewed by Adrian Perez de Castro.

When libsoup 3 is not found be more clear about the problem and
offer possible workaround to continue the build.

* Source/cmake/FindLibSoup.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

Modified Paths

Diff

Modified: trunk/ChangeLog (278752 => 278753)


--- trunk/ChangeLog	2021-06-11 03:37:18 UTC (rev 278752)
+++ trunk/ChangeLog	2021-06-11 04:52:23 UTC (rev 278753)
@@ -1,3 +1,17 @@
+2021-06-10  Carlos Alberto Lopez Perez  <clo...@igalia.com>
+
+        [CMake][GTK][WPE] Improve error message when libsoup3 is not found
+        https://bugs.webkit.org/show_bug.cgi?id=226905
+
+        Reviewed by Adrian Perez de Castro.
+
+        When libsoup 3 is not found be more clear about the problem and
+        offer possible workaround to continue the build.
+
+        * Source/cmake/FindLibSoup.cmake:
+        * Source/cmake/OptionsGTK.cmake:
+        * Source/cmake/OptionsWPE.cmake:
+
 2021-06-10  Philippe Normand  <pnorm...@igalia.com>
 
         [WPE] Enable Cog for developer builds

Modified: trunk/Source/cmake/FindLibSoup.cmake (278752 => 278753)


--- trunk/Source/cmake/FindLibSoup.cmake	2021-06-11 03:37:18 UTC (rev 278752)
+++ trunk/Source/cmake/FindLibSoup.cmake	2021-06-11 04:52:23 UTC (rev 278753)
@@ -42,7 +42,7 @@
 # .pc file, so we need to rely on PC_LIBSOUP_VERSION and REQUIRE the .pc file
 # to be found.
 find_package(PkgConfig QUIET)
-pkg_check_modules(PC_LIBSOUP REQUIRED QUIET "libsoup-${LIBSOUP_API_VERSION}")
+pkg_check_modules(PC_LIBSOUP QUIET "libsoup-${LIBSOUP_API_VERSION}")
 
 find_path(LIBSOUP_INCLUDE_DIRS
     NAMES libsoup/soup.h

Modified: trunk/Source/cmake/OptionsGTK.cmake (278752 => 278753)


--- trunk/Source/cmake/OptionsGTK.cmake	2021-06-11 03:37:18 UTC (rev 278752)
+++ trunk/Source/cmake/OptionsGTK.cmake	2021-06-11 04:52:23 UTC (rev 278753)
@@ -213,8 +213,16 @@
     set(SOUP_API_VERSION 3.0)
     set(ENABLE_SERVER_PRECONNECT ON)
 endif ()
-find_package(LibSoup ${SOUP_MINIMUM_VERSION} REQUIRED)
+find_package(LibSoup ${SOUP_MINIMUM_VERSION})
 
+if (NOT LibSoup_FOUND)
+if (USE_SOUP2)
+    message(FATAL_ERROR "libsoup is required.")
+else ()
+    message(FATAL_ERROR "libsoup 3 is required. Enable USE_SOUP2 to use libsoup 2 (disables HTTP/2)")
+endif ()
+endif ()
+
 if (USE_GTK4)
     set(WEBKITGTK_API_VERSION 5.0)
     set(WEBKITGTK_API_DOC_VERSION 5.0)

Modified: trunk/Source/cmake/OptionsWPE.cmake (278752 => 278753)


--- trunk/Source/cmake/OptionsWPE.cmake	2021-06-11 03:37:18 UTC (rev 278752)
+++ trunk/Source/cmake/OptionsWPE.cmake	2021-06-11 04:52:23 UTC (rev 278753)
@@ -132,8 +132,16 @@
     set(WPE_API_DOC_VERSION 1.0)
     set(ENABLE_SERVER_PRECONNECT ON)
 endif ()
-find_package(LibSoup ${SOUP_MINIMUM_VERSION} REQUIRED)
+find_package(LibSoup ${SOUP_MINIMUM_VERSION})
 
+if (NOT LibSoup_FOUND)
+if (USE_SOUP2)
+    message(FATAL_ERROR "libsoup is required.")
+else ()
+    message(FATAL_ERROR "libsoup 3 is required. Enable USE_SOUP2 to use libsoup 2 (disables HTTP/2)")
+endif ()
+endif ()
+
 if (WPE_API_VERSION VERSION_EQUAL "1.0")
     CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT 18 0 15)
 else ()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to