summaryrefslogtreecommitdiffstats
path: root/Modules/FindZLIB.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindZLIB.cmake')
-rw-r--r--Modules/FindZLIB.cmake11
1 files changed, 6 insertions, 5 deletions
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index 1dac67a..499ae77 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -41,12 +41,13 @@ IF (ZLIB_INCLUDE_DIR)
STRING(REGEX REPLACE ".*#define ZLIB_VERSION \"([0-9]+)\\.([0-9]+)\\.([0-9]+)\".*" "\\1.\\2.\\3" ZLIB_VERSION_STRING "${ZLIB_H}")
ENDIF()
-# Per-recommendation
-SET(ZLIB_INCLUDE_DIRS "${ZLIB_INCLUDE_DIR}")
-SET(ZLIB_LIBRARIES "${ZLIB_LIBRARY}")
-
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_INCLUDE_DIR ZLIB_LIBRARY)
+
+IF (ZLIB_FOUND)
+ SET(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
+ SET(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
+ENDIF()