diff options
author | msarett <msarett@google.com> | 2016-02-17 08:26:31 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-17 08:26:32 -0800 |
commit | 39b2d5a1ac4171aba0e92cb3f9882f62e5730e3e (patch) | |
tree | d79532f87a1b9f6b62db61389727d85d9a423fc9 /cmake | |
parent | 46d2aa824c0a0ee8218d90e821786bd51a63be1e (diff) |
Individually enable and disable SkCodecs
BUG=skia:4956
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1702533004
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot
Review URL: https://codereview.chromium.org/1702533004
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CMakeLists.txt | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 751361a927..2f2a81c32a 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -145,13 +145,6 @@ 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)) - remove_srcs(../src/codec/* ../src/android/*) -endif() - # Do not compile SkRawCodec. remove_srcs(../src/codec/*Raw*.cpp) @@ -167,15 +160,20 @@ endif() if (GIF_FOUND) list (APPEND private_includes ${GIF_INCLUDE_DIRS}) list (APPEND libs ${GIF_LIBRARIES}) + add_definitions(-DSK_CODEC_DECODES_GIF) else() remove_srcs(../src/images/*gif*) + remove_srcs(../src/codec/*Gif*) endif() if (JPEG_FOUND) list (APPEND private_includes ${JPEG_INCLUDE_DIRS}) list (APPEND libs ${JPEG_LIBRARIES}) + add_definitions(-DSK_CODEC_DECODES_JPEG) else() remove_srcs(../src/images/*jpeg*) + remove_srcs(../src/images/*Jpeg*) + remove_srcs(../src/codec/*Jpeg*) endif() if (LUA_FOUND) @@ -190,8 +188,12 @@ if (PNG_FOUND) list (APPEND libs ${PNG_LIBRARIES}) add_definitions(-DPNG_SKIP_SETJMP_CHECK) add_definitions(-DPNG_SKIP_SKIA_OPTS) + add_definitions(-DSK_CODEC_DECODES_PNG) else() remove_srcs(../src/images/*png*) + remove_srcs(../src/images/*ico*) + remove_srcs(../src/codec/*Png*) + remove_srcs(../src/codec/*Ico*) endif() if (ZLIB_FOUND) @@ -205,8 +207,10 @@ endif() if (WEBP_INCLUDE_DIRS AND WEBP_LIBRARIES) list (APPEND private_includes ${WEBP_INCLUDE_DIRS}) list (APPEND libs ${WEBP_LIBRARIES}) + add_definitions(-DSK_CODEC_DECODES_WEBP) else() remove_srcs(../src/images/*webp*) + remove_srcs(../src/codec/*Webp*) endif() if (FREETYPE_FOUND) |