Use zlib from external/zlib to build the minizip library on Win32

This commit is contained in:
Robert Knight 2011-08-22 16:37:53 +01:00
parent e11cc9193a
commit 6418b44924
2 changed files with 13 additions and 2 deletions

View file

@ -5,6 +5,10 @@ cmake_minimum_required(VERSION 2.6)
include_directories(external)
include_directories(external/TinyThread/source)
if (WIN32)
include_directories(external/zlib/)
endif()
add_subdirectory(src)
add_subdirectory(external/AnyOption)
add_subdirectory(external/minizip)

View file

@ -2,7 +2,9 @@ project(minizip)
cmake_minimum_required(VERSION 2.6)
if (UNIX)
find_package(ZLIB REQUIRED)
endif()
set (SOURCES
ioapi.c
@ -28,5 +30,10 @@ add_library(minizip
${HEADERS}
)
if (UNIX)
target_link_libraries(minizip z)
else()
target_link_libraries(minizip "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/zlib.lib")
endif()