From 804466b8c17cc2ca666b30f24d66c32702ac7d14 Mon Sep 17 00:00:00 2001 From: Ruza Markov Date: Fri, 16 Mar 2018 14:31:23 -0700 Subject: [PATCH] add lib png to build --- CMakeLists.txt | 1 + GeodeSupport.cmake | 1 - geode/CMakeLists.txt | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index babee073..b976e20d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ include(GeodeSupport.cmake) find_package(PkgConfig) find_package(JPEG) +find_package(PNG) set(GMP_LIB_DIR "/usr/lib/" CACHE PATH "Path to libgmp.so") set(GMP_INCLUDE_DIR "/usr/local/Cellar/ /usr/include/" CACHE PATH "Path to gmp.h") diff --git a/GeodeSupport.cmake b/GeodeSupport.cmake index e864d80c..7f607648 100644 --- a/GeodeSupport.cmake +++ b/GeodeSupport.cmake @@ -101,7 +101,6 @@ macro(ADD_GEODE_MODULE _name) -Wno-format-security -Wno-attributes -Wno-unused-variable - -fPIC ) CHECK_CXX_COMPILER_FLAG(-Wno-undefined-var-template COMPILER_CHECKS_UNDEFINED_VAR_TEMPLATE) diff --git a/geode/CMakeLists.txt b/geode/CMakeLists.txt index 36204584..3a0c0e8d 100644 --- a/geode/CMakeLists.txt +++ b/geode/CMakeLists.txt @@ -9,6 +9,9 @@ endif() if (JPEG_FOUND) set(GEODE_LIBJPEG YES) endif() +if (PNG_FOUND) + set(GEODE_LIBPNG YES) +endif() # Check Python binding configuration if (GEODE_REQUIRE_PYTHON AND NOT GEODE_PYTHON) @@ -106,6 +109,20 @@ if (JPEG_FOUND) ) endif() +if (PNG_FOUND) + target_include_directories( + geode + PUBLIC + ${PNG_INCLUDE} + ) + + target_link_libraries( + geode + PUBLIC + ${PNG_LIBRARIES} + ) +endif() + if (GEODE_PYTHON) target_link_libraries( geode