Title: [199518] trunk
- Revision
- 199518
- Author
- commit-qu...@webkit.org
- Date
- 2016-04-13 15:58:29 -0700 (Wed, 13 Apr 2016)
Log Message
FindWebP should not be misguided by pkg-config when cross-compiling.
https://bugs.webkit.org/show_bug.cgi?id=156544
Patch by Konstantin Tokarev <annu...@yandex.ru> on 2016-04-13
Reviewed by Michael Catanzaro.
We should use pkg-config output only as a hint, like other modules do.
* Source/cmake/FindWebP.cmake:
Modified Paths
Diff
Modified: trunk/ChangeLog (199517 => 199518)
--- trunk/ChangeLog 2016-04-13 22:45:21 UTC (rev 199517)
+++ trunk/ChangeLog 2016-04-13 22:58:29 UTC (rev 199518)
@@ -1,3 +1,14 @@
+2016-04-13 Konstantin Tokarev <annu...@yandex.ru>
+
+ FindWebP should not be misguided by pkg-config when cross-compiling.
+ https://bugs.webkit.org/show_bug.cgi?id=156544
+
+ Reviewed by Michael Catanzaro.
+
+ We should use pkg-config output only as a hint, like other modules do.
+
+ * Source/cmake/FindWebP.cmake:
+
2016-04-07 Carlos Garcia Campos <cgar...@igalia.com>
[GTK] Rework the theming code for GTK+ 3.20
Modified: trunk/Source/cmake/FindWebP.cmake (199517 => 199518)
--- trunk/Source/cmake/FindWebP.cmake 2016-04-13 22:45:21 UTC (rev 199517)
+++ trunk/Source/cmake/FindWebP.cmake 2016-04-13 22:58:29 UTC (rev 199518)
@@ -30,19 +30,22 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
find_package(PkgConfig)
-pkg_check_modules(WEBP libwebp)
+pkg_check_modules(PC_WEBP QUIET libwebp)
-if (NOT(WEBP_FOUND))
- # Older installations of libwebp do not install a pkgconfig file, so we fall
- # back to a manual search for a libwebp header file.
- include(CheckIncludeFiles)
- check_include_files("webp/decode.h" WEBP_FOUND_HEADER)
- if (WEBP_FOUND_HEADER)
- set(WEBP_LIBRARIES "-lwebp")
- set(WEBP_FOUND TRUE)
- endif ()
-endif ()
+# Look for the header file.
+find_path(WEBP_INCLUDE_DIRS
+ NAMES webp/decode.h
+ HINTS ${PC_WEBP_INCLUDEDIR} ${PC_WEBP_INCLUDE_DIRS}
+)
+mark_as_advanced(WEBP_INCLUDE_DIRS)
-# WEBP_INCLUDE_DIRS is often empty, so we rely only on WEBP_LIBRARIES.
+# Look for the library.
+find_library(
+ WEBP_LIBRARIES
+ NAMES webp
+ HINTS ${PC_WEBP_LIBDIR} ${PC_WEBP_LIBRARY_DIRS}
+)
+mark_as_advanced(WEBP_LIBRARIES)
+
include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(WEBP DEFAULT_MSG WEBP_LIBRARIES)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(WEBP DEFAULT_MSG WEBP_INCLUDE_DIRS WEBP_LIBRARIES)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes