Made zlib an optional dependency.

Only needed to read legacy files, which is not fully supported yet.  Hopefully
this will make it easier to build on Windows.
This commit is contained in:
Jim Evins
2017-11-25 03:18:39 -05:00
parent a48a929006
commit 32cde7cb1d
3 changed files with 28 additions and 5 deletions
+11 -1
View File
@@ -1,5 +1,15 @@
project (Model LANGUAGES CXX)
#=======================================
# Handle optional dependencies
#=======================================
if (${ZLIB_FOUND})
add_definitions (-DHAVE_ZLIB=1)
set (OPTIONAL_ZLIB ZLIB::ZLIB)
else ()
set (OPTIONAL_ZLIB "")
endif ()
#=======================================
# Sources
#=======================================
@@ -96,7 +106,7 @@ target_link_libraries (Model
Qt5::PrintSupport
Qt5::Xml
Qt5::Svg
ZLIB::ZLIB
${OPTIONAL_ZLIB}
)
#=======================================