mirror of
https://github.com/reactos/CMake.git
synced 2025-02-14 08:19:01 +00:00
FindZLIB: make sure zlib.h exists before reading it
This commit is contained in:
parent
6283ce6738
commit
4cde0b1a5f
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user