Fix up QuaZip zlib header lookup on Windows.

This commit is contained in:
Petr Mrázek 2013-09-08 22:31:49 +02:00
parent 3a6c7e009a
commit 05de1e75e9

View File

@ -1,16 +1,12 @@
project(quazip) project(quazip)
# use QtCreator's QTDIR var
IF(DEFINED ENV{QTDIR})
SET(Qt5_DIR $ENV{QTDIR})
ENDIF()
# Find ZLIB for quazip # Find ZLIB for quazip
# Use system zlib on unix and Qt ZLIB on Windows # Use system zlib on unix and Qt ZLIB on Windows
IF(UNIX) IF(UNIX)
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
ELSE(UNIX) ELSE(UNIX)
SET(ZLIB_INCLUDE_DIRS "${Qt5_DIR}/include/QtZlib" CACHE PATH "Path to ZLIB headers of Qt") get_filename_component (ZLIB_FOUND_DIR "${Qt5Core_DIR}/../../../include/QtZlib" ABSOLUTE)
SET(ZLIB_INCLUDE_DIRS ${ZLIB_FOUND_DIR} CACHE PATH "Path to ZLIB headers of Qt")
SET(ZLIB_LIBRARIES "") SET(ZLIB_LIBRARIES "")
IF(NOT EXISTS "${ZLIB_INCLUDE_DIRS}/zlib.h") IF(NOT EXISTS "${ZLIB_INCLUDE_DIRS}/zlib.h")
MESSAGE("Please specify a valid zlib include dir") MESSAGE("Please specify a valid zlib include dir")