summaryrefslogtreecommitdiff
path: root/Modules/FindPNG.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2009-09-14 15:53:07 -0400
committerAlexander Neundorf <neundorf@kde.org>2009-09-14 15:53:07 -0400
commit72f32c2b98b640f2415d7f651e8be2bec0b67297 (patch)
tree4a385e340e2245bb4ab9fd8a1eb1a6ee23ad43c3 /Modules/FindPNG.cmake
parent0a8532c3a0c6c4f2787e1561f9d5400ba3dbcbd7 (diff)
downloadcmake-72f32c2b98b640f2415d7f651e8be2bec0b67297.tar.gz
fix #9152: find ZLIB quietly if PNG is searched QUIETLY
Alex
Diffstat (limited to 'Modules/FindPNG.cmake')
-rw-r--r--Modules/FindPNG.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake
index 11d6d01747..3c32316e0d 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 )