diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2010-05-13 04:34:33 (GMT) |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2010-05-13 04:34:33 (GMT) |
commit | 44e646701556dd47d7475650a2d27c26118ea8b8 (patch) | |
tree | 6657c1a53f620d39c151c53e8dbc8e5de88f645d /Modules/FindZLIB.cmake | |
parent | f7abdff7213adc16b08fe1f6770001b773d68e09 (diff) | |
download | CMake-44e646701556dd47d7475650a2d27c26118ea8b8.zip CMake-44e646701556dd47d7475650a2d27c26118ea8b8.tar.gz CMake-44e646701556dd47d7475650a2d27c26118ea8b8.tar.bz2 |
FindZLIB: make sure zlib.h exists before reading it
Diffstat (limited to 'Modules/FindZLIB.cmake')
-rw-r--r-- | Modules/FindZLIB.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake index 499ae77..b437e6b 100644 --- a/Modules/FindZLIB.cmake +++ b/Modules/FindZLIB.cmake @@ -36,7 +36,7 @@ FIND_LIBRARY(ZLIB_LIBRARY ) MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) -IF (ZLIB_INCLUDE_DIR) +IF (ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h") FILE(READ "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H) STRING(REGEX REPLACE ".*#define ZLIB_VERSION \"([0-9]+)\\.([0-9]+)\\.([0-9]+)\".*" "\\1.\\2.\\3" ZLIB_VERSION_STRING "${ZLIB_H}") ENDIF() |