From 81fa7c3c3aeae80230253052015d8e5c34ba4201 Mon Sep 17 00:00:00 2001 From: Sky Date: Sun, 8 Sep 2013 19:51:40 +0100 Subject: [PATCH] Attempt to fix quazip build error on Windows --- depends/quazip/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/depends/quazip/CMakeLists.txt b/depends/quazip/CMakeLists.txt index a9adcefe..6211fd28 100644 --- a/depends/quazip/CMakeLists.txt +++ b/depends/quazip/CMakeLists.txt @@ -1,11 +1,16 @@ project(quazip) +# use QtCreator's QTDIR var +IF(DEFINED ENV{QTDIR}) + SET(Qt5_DIR $ENV{QTDIR}) +ENDIF() + # Find ZLIB for quazip # Use system zlib on unix and Qt ZLIB on Windows IF(UNIX) find_package(ZLIB REQUIRED) ELSE(UNIX) - SET(ZLIB_INCLUDE_DIRS "${QT_ROOT}/src/3rdparty/zlib" CACHE PATH "Path to ZLIB headers of Qt") + SET(ZLIB_INCLUDE_DIRS "${Qt5_DIR}/include/QtZlib" CACHE PATH "Path to ZLIB headers of Qt") SET(ZLIB_LIBRARIES "") IF(NOT EXISTS "${ZLIB_INCLUDE_DIRS}/zlib.h") MESSAGE("Please specify a valid zlib include dir")