annotate OrthancFramework/Resources/CMake/LibJpegConfiguration.cmake @ 4737:979ae3ea3381

DANGEROUS commit: Anonymization is now also applied to nested sequences
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 06 Jul 2021 08:12:26 +0200
parents d9473bd5ed43
children 7053502fbf97
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4120
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
1 # Orthanc - A Lightweight, RESTful DICOM Store
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
3 # Department, University Hospital of Liege, Belgium
4437
d9473bd5ed43 upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
4 # Copyright (C) 2017-2021 Osimis S.A., Belgium
4120
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
5 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
6 # This program is free software: you can redistribute it and/or
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
7 # modify it under the terms of the GNU Lesser General Public License
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
8 # as published by the Free Software Foundation, either version 3 of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
9 # the License, or (at your option) any later version.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
10 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
11 # This program is distributed in the hope that it will be useful, but
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
14 # Lesser General Public License for more details.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
15 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
16 # You should have received a copy of the GNU Lesser General Public
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
17 # License along with this program. If not, see
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
18 # <http://www.gnu.org/licenses/>.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
19
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
20
1602
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 if (STATIC_BUILD OR NOT USE_SYSTEM_LIBJPEG)
3286
2b547eaed193 upgrade to libjpeg 9c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
22 set(LIBJPEG_SOURCES_DIR ${CMAKE_BINARY_DIR}/jpeg-9c)
1602
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 DownloadPackage(
3286
2b547eaed193 upgrade to libjpeg 9c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
24 "93c62597eeef81a84d988bccbda1e990"
2b547eaed193 upgrade to libjpeg 9c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
25 "http://orthanc.osimis.io/ThirdPartyDownloads/jpegsrc.v9c.tar.gz"
1602
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 "${LIBJPEG_SOURCES_DIR}")
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 include_directories(
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 ${LIBJPEG_SOURCES_DIR}
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 )
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 list(APPEND LIBJPEG_SOURCES
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 ${LIBJPEG_SOURCES_DIR}/jaricom.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 ${LIBJPEG_SOURCES_DIR}/jcapimin.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 ${LIBJPEG_SOURCES_DIR}/jcapistd.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 ${LIBJPEG_SOURCES_DIR}/jcarith.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 ${LIBJPEG_SOURCES_DIR}/jccoefct.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 ${LIBJPEG_SOURCES_DIR}/jccolor.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 ${LIBJPEG_SOURCES_DIR}/jcdctmgr.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 ${LIBJPEG_SOURCES_DIR}/jchuff.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 ${LIBJPEG_SOURCES_DIR}/jcinit.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 ${LIBJPEG_SOURCES_DIR}/jcmarker.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 ${LIBJPEG_SOURCES_DIR}/jcmaster.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 ${LIBJPEG_SOURCES_DIR}/jcomapi.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 ${LIBJPEG_SOURCES_DIR}/jcparam.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 ${LIBJPEG_SOURCES_DIR}/jcprepct.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 ${LIBJPEG_SOURCES_DIR}/jcsample.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 ${LIBJPEG_SOURCES_DIR}/jctrans.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 ${LIBJPEG_SOURCES_DIR}/jdapimin.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 ${LIBJPEG_SOURCES_DIR}/jdapistd.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 ${LIBJPEG_SOURCES_DIR}/jdarith.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 ${LIBJPEG_SOURCES_DIR}/jdatadst.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 ${LIBJPEG_SOURCES_DIR}/jdatasrc.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 ${LIBJPEG_SOURCES_DIR}/jdcoefct.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 ${LIBJPEG_SOURCES_DIR}/jdcolor.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 ${LIBJPEG_SOURCES_DIR}/jddctmgr.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 ${LIBJPEG_SOURCES_DIR}/jdhuff.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 ${LIBJPEG_SOURCES_DIR}/jdinput.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 ${LIBJPEG_SOURCES_DIR}/jcmainct.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 ${LIBJPEG_SOURCES_DIR}/jdmainct.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 ${LIBJPEG_SOURCES_DIR}/jdmarker.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 ${LIBJPEG_SOURCES_DIR}/jdmaster.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 ${LIBJPEG_SOURCES_DIR}/jdmerge.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 ${LIBJPEG_SOURCES_DIR}/jdpostct.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 ${LIBJPEG_SOURCES_DIR}/jdsample.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 ${LIBJPEG_SOURCES_DIR}/jdtrans.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 ${LIBJPEG_SOURCES_DIR}/jerror.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 ${LIBJPEG_SOURCES_DIR}/jfdctflt.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 ${LIBJPEG_SOURCES_DIR}/jfdctfst.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 ${LIBJPEG_SOURCES_DIR}/jfdctint.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 ${LIBJPEG_SOURCES_DIR}/jidctflt.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 ${LIBJPEG_SOURCES_DIR}/jidctfst.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 ${LIBJPEG_SOURCES_DIR}/jidctint.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 #${LIBJPEG_SOURCES_DIR}/jmemansi.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 #${LIBJPEG_SOURCES_DIR}/jmemdos.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 #${LIBJPEG_SOURCES_DIR}/jmemmac.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 ${LIBJPEG_SOURCES_DIR}/jmemmgr.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 #${LIBJPEG_SOURCES_DIR}/jmemname.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 ${LIBJPEG_SOURCES_DIR}/jmemnobs.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 ${LIBJPEG_SOURCES_DIR}/jquant1.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 ${LIBJPEG_SOURCES_DIR}/jquant2.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 ${LIBJPEG_SOURCES_DIR}/jutils.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 # ${LIBJPEG_SOURCES_DIR}/rdbmp.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 # ${LIBJPEG_SOURCES_DIR}/rdcolmap.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 # ${LIBJPEG_SOURCES_DIR}/rdgif.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 # ${LIBJPEG_SOURCES_DIR}/rdppm.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 # ${LIBJPEG_SOURCES_DIR}/rdrle.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 # ${LIBJPEG_SOURCES_DIR}/rdswitch.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 # ${LIBJPEG_SOURCES_DIR}/rdtarga.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 # ${LIBJPEG_SOURCES_DIR}/transupp.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 # ${LIBJPEG_SOURCES_DIR}/wrbmp.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 # ${LIBJPEG_SOURCES_DIR}/wrgif.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 # ${LIBJPEG_SOURCES_DIR}/wrppm.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 # ${LIBJPEG_SOURCES_DIR}/wrrle.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 # ${LIBJPEG_SOURCES_DIR}/wrtarga.c
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 )
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 configure_file(
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 ${LIBJPEG_SOURCES_DIR}/jconfig.txt
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 ${LIBJPEG_SOURCES_DIR}/jconfig.h COPYONLY
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 )
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103
2113
0108ac01fc8e added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1602
diff changeset
104 source_group(ThirdParty\\libjpeg REGULAR_EXPRESSION ${LIBJPEG_SOURCES_DIR}/.*)
0108ac01fc8e added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1602
diff changeset
105
1602
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 else()
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 include(FindJPEG)
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 if (NOT ${JPEG_FOUND})
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 message(FATAL_ERROR "Unable to find libjpeg")
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 endif()
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 include_directories(${JPEG_INCLUDE_DIR})
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 link_libraries(${JPEG_LIBRARIES})
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 endif()