diff options
author | Alexander Neundorf <neundorf@kde.org> | 2009-09-14 19:53:07 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2009-09-14 19:53:07 (GMT) |
commit | 72f32c2b98b640f2415d7f651e8be2bec0b67297 (patch) | |
tree | 4a385e340e2245bb4ab9fd8a1eb1a6ee23ad43c3 /Modules/FindPNG.cmake | |
parent | 0a8532c3a0c6c4f2787e1561f9d5400ba3dbcbd7 (diff) | |
download | CMake-72f32c2b98b640f2415d7f651e8be2bec0b67297.zip CMake-72f32c2b98b640f2415d7f651e8be2bec0b67297.tar.gz CMake-72f32c2b98b640f2415d7f651e8be2bec0b67297.tar.bz2 |
fix #9152: find ZLIB quietly if PNG is searched QUIETLY
Alex
Diffstat (limited to 'Modules/FindPNG.cmake')
-rw-r--r-- | Modules/FindPNG.cmake | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake index 11d6d01..3c32316 100644 --- a/Modules/FindPNG.cmake +++ b/Modules/FindPNG.cmake @@ -9,7 +9,12 @@ # PNG_LIBRARY, where to find the PNG library. # None of the above will be defined unles zlib can be found. # PNG depends on Zlib -include(FindZLIB) + + +if(PNG_FIND_QUIETLY) + set(_FIND_ZLIB_ARG QUIET) +endif(PNG_FIND_QUIETLY) +find_package(ZLIB ${_FIND_ZLIB_ARG}) if(ZLIB_FOUND) find_path(PNG_PNG_INCLUDE_DIR png.h @@ -39,6 +44,6 @@ endif(ZLIB_FOUND) # handle the QUIETLY and REQUIRED arguments and set PNG_FOUND to TRUE if # all listed variables are TRUE include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(PNG DEFAULT_MSG PNG_LIBRARY PNG_PNG_INCLUDE_DIR) +find_package_handle_standard_args(PNG DEFAULT_MSG PNG_LIBRARY PNG_PNG_INCLUDE_DIR) mark_as_advanced(PNG_PNG_INCLUDE_DIR PNG_LIBRARY ) |