Skip to content

Commit

Permalink
cmake: Only use system's PNG if system's ZLIB meets our needs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfonseca committed Mar 15, 2015
1 parent 33d5be1 commit 40f5ce1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Expand Up @@ -391,7 +391,11 @@ if (NOT ZLIB_FOUND)
endif ()
include_directories (${ZLIB_INCLUDE_DIRS})

if (NOT WIN32)
# FindPNG.cmake will search ZLIB internally (without requiring any particular
# version), adding its include dirs and libraries, and overwriting ZLIB_FOUND.
# So if the system's ZLIB was did not meet the our requirements, then there's
# no safe way to use the system's PNG library.
if (NOT WIN32 AND ZLIB_FOUND)
find_package (PNG)
endif ()
if (NOT PNG_FOUND)
Expand Down

0 comments on commit 40f5ce1

Please sign in to comment.