From 32b4d32bef75d56bd3dc3f9345341a89659c5ed5 Mon Sep 17 00:00:00 2001 From: raburton Date: Sat, 5 Jan 2008 19:16:30 +0000 Subject: [PATCH] Make building minizip optional, if your linux distro supplies a minizip binary (e.g. in the zlib-bin package on debian) you might as well use it instead of building this one. Note that this isn't implemented in the minizip CMakeLists.txt, but at the higher level (kicad) that includes the minizip subdirectory, so that the whole minizip directory can be dropped from the shipped source tree if it isn't needed on your distro. This makes the source package a fraction smaller and removes possible complications of having a different license on the minizip code to the rest of kicad. --- CMakeLists.txt | 5 ++++- kicad/CMakeLists.txt | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0db69bd316..f5a1e26292 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Our project is called 'kicad'.This is how it will be called in +# Our project is called 'kicad'. This is what it will be called in # Visual Studio and in our makefiles. PROJECT(kicad) @@ -7,6 +7,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR) # Uncomment this line if you want verbose build messages. #SET(CMAKE_VERBOSE_MAKEFILE ON) +# Comment this out if you don't want to build minizip. +SET(BUILD_MINIZIP ON CACHE BOOL "Build minizip?") + # Set default flags for Debug build. SET(CMAKE_C_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG") SET(CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG") diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index 042f10963f..116ab644ea 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -38,4 +38,6 @@ TARGET_LINK_LIBRARIES(kicad common ${wxWidgets_LIBRARIES}) INSTALL(TARGETS kicad RUNTIME DESTINATION ${KICAD_BIN}) -ADD_SUBDIRECTORY(minizip) +IF(BUILD_MINIZIP) + ADD_SUBDIRECTORY(minizip) +ENDIF(BUILD_MINIZIP)