]> gerrit.simantics Code Review - simantics/fmil.git/blob - org.simantics.fmil.core/native/FMILibrary/Config.cmake/fmizip.cmake
Switch to full JavaSE-11+ compatibility
[simantics/fmil.git] / org.simantics.fmil.core / native / FMILibrary / Config.cmake / fmizip.cmake
1 #    Copyright (C) 2012 Modelon AB
2
3 #    This program is free software: you can redistribute it and/or modify
4 #    it under the terms of the BSD style license.
5
6 # #    This program is distributed in the hope that it will be useful,
7 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
8 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9 #    FMILIB_License.txt file for more details.
10
11 #    You should have received a copy of the FMILIB_License.txt file
12 #    along with this program. If not, contact Modelon AB <http://www.modelon.com>.
13
14 if(NOT FMIZIPDIR)
15     set(FMIZIPDIR ${FMILIBRARYHOME}/src/ZIP)
16         
17     include(jmutil)
18         
19         # set(DOXYFILE_EXTRA_SOURCES "${DOXYFILE_EXTRA_SOURCES} \"${FMIZIPDIR}/include\"")
20
21     set(FMIZIP_LIBRARIES fmizip)
22         
23     add_subdirectory(Config.cmake/Minizip)
24         
25         include_directories("${FMIZIPDIR}/include" "${FMILIB_THIRDPARTYLIBS}/Minizip/minizip" "${FMILIB_THIRDPARTYLIBS}/FMI" "${FMILIB_THIRDPARTYLIBS}/Zlib/zlib-1.2.6" "${FMILibrary_BINARY_DIR}/zlib")
26
27 set(FMIZIPSOURCE
28   ${FMIZIPDIR}/src/fmi_zip_unzip.c
29   ${FMIZIPDIR}/src/fmi_zip_zip.c
30 )
31
32 set(FMIZIPHEADERS
33 #  src/fmi_zip_unzip_impl.h
34   ${FMIZIPDIR}/include/FMI/fmi_zip_unzip.h
35   ${FMIZIPDIR}/include/FMI/fmi_zip_zip.h
36 )
37
38 #include_directories("${FMILIB_THIRDPARTYLIBS}/zlib/lib/VS2005/win32")
39
40 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DZLIB_STATIC")
41
42 add_library(fmizip ${FMILIBKIND} ${FMIZIPSOURCE} ${FMIZIPHEADERS})
43
44 target_link_libraries(fmizip minizip jmutils)
45
46 endif(NOT FMIZIPDIR)