diff --git a/CMakeLists.txt b/CMakeLists.txt index c6a26ca..d53b4aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/external/minizip/CMakeLists.txt b/external/minizip/CMakeLists.txt index 22150f4..5f4bb07 100644 --- a/external/minizip/CMakeLists.txt +++ b/external/minizip/CMakeLists.txt @@ -2,7 +2,9 @@ project(minizip) cmake_minimum_required(VERSION 2.6) -find_package(ZLIB REQUIRED) +if (UNIX) + find_package(ZLIB REQUIRED) +endif() set (SOURCES ioapi.c @@ -28,5 +30,10 @@ add_library(minizip ${HEADERS} ) -target_link_libraries(minizip z) +if (UNIX) + target_link_libraries(minizip z) +else() + target_link_libraries(minizip "${CMAKE_CURRENT_SOURCE_DIR}/../zlib/zlib.lib") +endif() +