Skip to content

Commit

Permalink
cmake: add ZLIB_INCLUDE_DIRS to include directories before external/u…
Browse files Browse the repository at this point in the history
…nzip compile (fix compilation with msvc)
  • Loading branch information
vovkasm committed Jan 26, 2015
1 parent 567c593 commit fc5023c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fc5023c

Please sign in to comment.