Index: cmake/CMakeLists.txt |
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt |
index ef0856a3ea338b9942af1edf460d5885ca2a1c58..8b00c51391927c73cc86e4eec7a3fb3591f4aaba 100644 |
--- a/cmake/CMakeLists.txt |
+++ b/cmake/CMakeLists.txt |
@@ -35,6 +35,12 @@ list (APPEND public_includes ${userconfig_directory}) |
list (APPEND srcs ../third_party/etc1/etc1.cpp ../third_party/ktx/ktx.cpp) |
list (APPEND private_includes ../third_party/etc1 ../third_party/ktx) |
+list (APPEND private_includes ../third_party/libpng) |
scroggo
2016/06/02 16:15:10
I know very little of CMake, and I'm still working
msarett
2016/06/02 16:35:33
Looks right, I think, though I haven't done too mu
scroggo
2016/06/02 17:03:27
Done.
msarett
2016/06/02 17:10:36
The CMake trybots actually run automatically in th
|
+file (GLOB libpng_srcs ../third_party/libpng/*.c) |
+foreach (src ${libpng_srcs}) |
+ list (APPEND srcs ${src}) |
+endforeach() |
+ |
function (remove_srcs) |
file (GLOB_RECURSE to_remove ${ARGN}) |
list (REMOVE_ITEM srcs ${to_remove}) |
@@ -148,7 +154,6 @@ if (UNIX AND NOT APPLE) |
find_library (FONTCONFIG_LIBRARIES fontconfig) |
find_package (GIF) |
find_package (JPEG) |
- find_package (PNG) |
endif() |
# Do not compile SkRawCodec. |
@@ -188,17 +193,10 @@ else() |
remove_srcs(../src/utils/*Lua*) |
endif() |
-if (PNG_FOUND) |
- list (APPEND private_includes ${PNG_INCLUDE_DIRS}) |
- list (APPEND libs ${PNG_LIBRARIES}) |
+# PNG |
add_definitions(-DPNG_SKIP_SETJMP_CHECK) |
scroggo
2016/06/02 16:15:10
I did not see this or PNG_SKIP_SKIA_OPTS anywhere
msarett
2016/06/02 16:35:33
I believe that they are both safe to delete.
nit:
scroggo
2016/06/02 17:03:27
Removed.
|
add_definitions(-DPNG_SKIP_SKIA_OPTS) |
add_definitions(-DSK_HAS_PNG_LIBRARY) |
-else() |
- remove_srcs(../src/images/*PNG*) |
- remove_srcs(../src/codec/*Png*) |
- remove_srcs(../src/codec/*Ico*) |
-endif() |
if (ZLIB_FOUND) |
list (APPEND private_includes ${ZLIB_INCLUDE_DIRS}) |