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

Unified Diff: cmake/CMakeLists.txt

Issue 1705503002: Add SkCodec to the CMake build (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | cmake/README.md » ('j') | 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 58c04db8d935b3d336ab76065829b970bfa0563d..751361a92796e246508ee6f275735f3b71c65db1 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -113,7 +113,6 @@ if (WIN32)
endif()
remove_srcs(../src/gpu/gl/angle/*) # TODO
-remove_srcs(../src/codec/* ../src/android/*) # TODO: Requires Chromium's libjpeg-turbo, and incompatible giflib.
# Certain files must be compiled with support for SSSE3, SSE4.1, AVX, or AVX2 intrinsics.
file (GLOB_RECURSE ssse3_srcs ../src/*ssse3*.cpp ../src/*SSSE3*.cpp)
@@ -146,6 +145,16 @@ if (UNIX AND NOT APPLE)
find_package (PNG)
endif()
+# Decide whether to turn on SkCodec.
+# TODO (skbug.com/4956): We should be able to turn specific codecs on and off rather than
+# disabling all of them if one library is missing.
+if (NOT (GIF_FOUND AND JPEG_FOUND AND PNG_FOUND AND WEBP_INCLUDE_DIRS AND WEBP_LIBRARIES))
msarett 2016/02/16 19:47:12 Do the CMake bots have libwebp? Otherwise this CL
+ remove_srcs(../src/codec/* ../src/android/*)
+endif()
+
+# Do not compile SkRawCodec.
+remove_srcs(../src/codec/*Raw*.cpp)
+
# TODO: macro away this if (found) ... else() ... endif() stuff.
if (EXPAT_FOUND)
@@ -179,6 +188,8 @@ endif()
if (PNG_FOUND)
list (APPEND private_includes ${PNG_INCLUDE_DIRS})
list (APPEND libs ${PNG_LIBRARIES})
+ add_definitions(-DPNG_SKIP_SETJMP_CHECK)
+ add_definitions(-DPNG_SKIP_SKIA_OPTS)
else()
remove_srcs(../src/images/*png*)
endif()
« no previous file with comments | « no previous file | cmake/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698