Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: cmake/CMakeLists.txt

Issue 2273753002: CMake: require libjpeg-turbo, not libjpeg (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: version check using pkg-config Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cmake/CMakeLists.txt
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index fd1b98cc56e6111a67ab18d4d7e3f5b0c3f4a3e9..c54d430beea6447f1f966e779a9ed014fcd82294 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -147,19 +147,24 @@ endif()
find_package (EXPAT)
find_package (Lua)
find_package (ZLIB)
-# No find_package for libwebp as far as I can tell, so simulate it here.
+
+# For libraries that don't have find_package() scripts, we do it ourselves:
find_path (WEBP_INCLUDE_DIRS "webp/decode.h")
-find_library (WEBP_LIBRARIES webp)
+find_library (WEBP_LIBRARIES "webp")
+
find_path (OSMESA_INCLUDE_DIRS "GL/osmesa.h")
find_library(OSMESA_LIBRARIES "OSMesa")
if (UNIX AND NOT APPLE)
find_package (Freetype)
- # Same deal for fontconfig.
+ find_package (GIF)
+
find_path (FONTCONFIG_INCLUDE_DIRS "fontconfig/fontconfig.h")
find_library (FONTCONFIG_LIBRARIES fontconfig)
- find_package (GIF)
- find_package (JPEG)
+
+ # We require libjpeg-turbo >= 1.5.0.
+ find_package(PkgConfig)
+ pkg_check_modules(JPEG_TURBO libjpeg>=1.5.0)
endif()
# Do not compile SkRawCodec.
@@ -183,9 +188,9 @@ else()
remove_srcs(../src/codec/*Gif*)
endif()
-if (JPEG_FOUND)
- list (APPEND private_includes ${JPEG_INCLUDE_DIRS})
- list (APPEND libs ${JPEG_LIBRARIES})
+if (JPEG_TURBO_FOUND)
+ list (APPEND private_includes ${JPEG_TURBO_INCLUDE_DIRS})
+ list (APPEND libs ${JPEG_TURBO_LIBRARIES})
add_definitions(-DSK_HAS_JPEG_LIBRARY)
else()
remove_srcs(../src/images/*JPEG*)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698