From b21b75aeccc07d0b8795acef6f79d8995cd86f6d Mon Sep 17 00:00:00 2001 From: CHARRAS Date: Tue, 29 Jan 2008 20:34:34 +0000 Subject: [PATCH] an ugly fix to build minizip under windows( ugly, but it works for me) If anyone can refine this, it is welcomed (see minizip/CMakeLists.txt for comments) --- kicad/minizip/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/kicad/minizip/CMakeLists.txt b/kicad/minizip/CMakeLists.txt index f6b3c0c451..02309e3693 100644 --- a/kicad/minizip/CMakeLists.txt +++ b/kicad/minizip/CMakeLists.txt @@ -4,8 +4,14 @@ IF(ZLIB_FOUND) ELSE(ZLIB_FOUND) MESSAGE(STATUS "Check for installed zlib -- not found") IF (NOT MINGW) - MESSAGE(FATAL_ERROR + MESSAGE(FATAL_ERROR "zlib was not found - it is required to build KiCad") + ELSE (NOT MINGW) + # zlib is not installed, and in this case wxWidgets creates its own zlib library + # include files are in ${wxWidgets_ROOT_DIR}/src/zlib + #and the corresponding library is libwxzlib-.a ( like libwxzlib-2.8.a) + # and we try to use it + INCLUDE_DIRECTORIES(${wxWidgets_ROOT_DIR}/src/zlib) ENDIF (NOT MINGW) ENDIF(ZLIB_FOUND) @@ -16,6 +22,6 @@ SET(MINIZIP_SRCS ADD_EXECUTABLE(minizip ${MINIZIP_SRCS} ) -TARGET_LINK_LIBRARIES(minizip ${ZLIB_LIBRARIES}) +TARGET_LINK_LIBRARIES(minizip ${ZLIB_LIBRARIES} ${wxWidgets_LIBRARIES}) INSTALL(TARGETS minizip RUNTIME DESTINATION bin COMPONENT binary)