mirror of
https://github.com/opencv/opencv.git
synced 2026-09-11 04:43:22 -05:00
Fix zlib version parse
Currently cmake scripttry to use regex to parse VER_MAJOR, VER_MINOR, VER_REVISION from ZLIB_VERSION. However, ZLIB_VERSION is "1.3" which means that there is no VER_REVISION. You can reproduce using "-DBUILD_ZLIB=ON" ``` -- ZLib: zlib (ver 1.3.#define ZLIB_VERSION "1.3") ``` This patch add a new macro ocv_parse_header_version to extract version information.
This commit is contained in:
@@ -34,7 +34,7 @@ if(NOT ZLIB_FOUND)
|
||||
set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
|
||||
set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
|
||||
|
||||
ocv_parse_header2(ZLIB "${${ZLIB_LIBRARY}_SOURCE_DIR}/zlib.h" ZLIB_VERSION)
|
||||
ocv_parse_header_version(ZLIB "${${ZLIB_LIBRARY}_SOURCE_DIR}/zlib.h")
|
||||
endif()
|
||||
|
||||
# --- libavif (optional) ---
|
||||
|
||||
Reference in New Issue
Block a user