I'm trying to compile libzip-1.3.0 on Windows 10 using cmake and MSVC2017.
I've successfully compiled that latest zlib (1.2.11), but when I try to compile libzip, I get told that: ZLIB version too old, please install at least v1.1.2
My zlib.h version definitions:
#define ZLIB_VERSION "1.2.11"
#define ZLIB_VERNUM 0x12b0
#define ZLIB_VER_MAJOR 1
#define ZLIB_VER_MINOR 2
#define ZLIB_VER_REVISION 11
#define ZLIB_VER_SUBREVISION 0
The cmake command I'm running:
cmake .. -G"Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX="C:\devel\lib\libzip" -DZLIB_LIBRARY:FILEPATH="C:\devel\lib\zlib\lib" -DZLIB_INCLUDE_DIR:PATH="C:\devel\lib\zlib"
I did find an old thread on the internet where someone else had a similar issue, but when I look at the relevant part of the CMakeLists.txt
file, it looks like it is now correct:
FIND_PACKAGE(ZLIB REQUIRED)
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
set(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR})
IF(ZLIB_VERSION_STRING VERSION_LESS "1.1.2")
MESSAGE(FATAL_ERROR "-- ZLIB version too old, please install at least v1.1.2")
ENDIF(ZLIB_VERSION_STRING VERSION_LESS "1.1.2")
So - why is zlib 1.2.11 "older" than 1.1.2 and how do I get around this and compile libzip?