Skip to content

Commit

Permalink
add lib png to build
Browse files Browse the repository at this point in the history
  • Loading branch information
o8ruza8o committed Mar 16, 2018
1 parent b682304 commit 804466b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -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")
Expand Down
1 change: 0 additions & 1 deletion GeodeSupport.cmake
Expand Up @@ -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)
Expand Down
17 changes: 17 additions & 0 deletions geode/CMakeLists.txt
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 804466b

Please sign in to comment.