File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,11 @@ if(COMPILE_ZLIB)
6060 OPTIONS "${zlib-ng_OPTIONS}" )
6161
6262 if (zlib-ng_ADDED)
63- file (STRINGS "${zlib-ng_SOURCE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \" [^\" ]*\" $" )
63+ if (EXISTS "${zlib-ng_SOURCE_DIR}/zlib.h.in" )
64+ file (STRINGS "${zlib-ng_SOURCE_DIR}/zlib.h.in" ZLIB_H REGEX "^#define ZLIB_VERSION \" [^\" ]*\" $" )
65+ else ()
66+ file (STRINGS "${zlib-ng_SOURCE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \" [^\" ]*\" $" )
67+ endif ()
6468 string (REGEX REPLACE "^.*ZLIB_VERSION \" ([0-9]+).*$" "\\ 1" ZLIB_VERSION_MAJOR "${ZLIB_H} " )
6569 string (REGEX REPLACE "^.*ZLIB_VERSION \" [0-9]+\\ .([0-9]+).*$" "\\ 1" ZLIB_VERSION_MINOR "${ZLIB_H} " )
6670 string (REGEX REPLACE "^.*ZLIB_VERSION \" [0-9]+\\ .[0-9]+\\ .([0-9]+).*$" "\\ 1" ZLIB_VERSION_PATCH "${ZLIB_H} " )
You can’t perform that action at this time.
0 commit comments