From fc5023c9e7259683ebf95b29cd5efad3129bd0e3 Mon Sep 17 00:00:00 2001 From: Vladimir Timofeev Date: Sun, 21 Dec 2014 14:25:33 +0300 Subject: [PATCH] cmake: add ZLIB_INCLUDE_DIRS to include directories before external/unzip compile (fix compilation with msvc) --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 60325ad8c534..42395a83f5fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,9 +236,11 @@ cocos_find_package(ZLIB ZLIB REQUIRED) # moreover our embedded version modified to quick provide # functionality needed by cocos. if(USE_PREBUILT_LIBS OR NOT MINGW) + #TODO: hack! should be in external/unzip/CMakeLists.txt + include_directories(${ZLIB_INCLUDE_DIRS}) add_subdirectory(external/unzip) - set(MINIZIP_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/unzip) - set(MINIZIP_LIBRARIES unzip) + set(MINIZIP_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/unzip ${ZLIB_INCLUDE_DIRS}) + set(MINIZIP_LIBRARIES unzip ${ZLIB_LIBRARIES}) message(STATUS "MINIZIP include dirs: ${MINIZIP_INCLUDE_DIRS}") else() cocos_find_package(MINIZIP MINIZIP REQUIRED)