comparison Resources/CMake/ZlibConfiguration.cmake @ 0:02f7a0400a91

initial commit
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 25 Feb 2015 13:45:35 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:02f7a0400a91
1 # Orthanc - A Lightweight, RESTful DICOM Store
2 # Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics
3 # Department, University Hospital of Liege, Belgium
4 #
5 # This program is free software: you can redistribute it and/or
6 # modify it under the terms of the GNU Affero General Public License
7 # as published by the Free Software Foundation, either version 3 of
8 # the License, or (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Affero General Public License for more details.
14 #
15 # You should have received a copy of the GNU Affero General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18
19 # This is the minizip distribution to create ZIP files
20 list(APPEND THIRD_PARTY_SOURCES
21 ${ORTHANC_ROOT}/Resources/ThirdParty/minizip/ioapi.c
22 ${ORTHANC_ROOT}/Resources/ThirdParty/minizip/zip.c
23 )
24
25 if (STATIC_BUILD OR NOT USE_SYSTEM_ZLIB)
26 SET(ZLIB_SOURCES_DIR ${CMAKE_BINARY_DIR}/zlib-1.2.7)
27 DownloadPackage(
28 "60df6a37c56e7c1366cca812414f7b85"
29 "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/zlib-1.2.7.tar.gz"
30 "${ZLIB_SOURCES_DIR}")
31
32 include_directories(
33 ${ZLIB_SOURCES_DIR}
34 )
35
36 list(APPEND ZLIB_SOURCES
37 ${ZLIB_SOURCES_DIR}/adler32.c
38 ${ZLIB_SOURCES_DIR}/compress.c
39 ${ZLIB_SOURCES_DIR}/crc32.c
40 ${ZLIB_SOURCES_DIR}/deflate.c
41 ${ZLIB_SOURCES_DIR}/gzclose.c
42 ${ZLIB_SOURCES_DIR}/gzlib.c
43 ${ZLIB_SOURCES_DIR}/gzread.c
44 ${ZLIB_SOURCES_DIR}/gzwrite.c
45 ${ZLIB_SOURCES_DIR}/infback.c
46 ${ZLIB_SOURCES_DIR}/inffast.c
47 ${ZLIB_SOURCES_DIR}/inflate.c
48 ${ZLIB_SOURCES_DIR}/inftrees.c
49 ${ZLIB_SOURCES_DIR}/trees.c
50 ${ZLIB_SOURCES_DIR}/uncompr.c
51 ${ZLIB_SOURCES_DIR}/zutil.c
52 )
53
54 else()
55 include(FindZLIB)
56 include_directories(${ZLIB_INCLUDE_DIRS})
57 link_libraries(${ZLIB_LIBRARIES})
58 endif()
59
60 source_group(ThirdParty\\ZLib REGULAR_EXPRESSION ${ZLIB_SOURCES_DIR}/.*)