Mercurial > hg > orthanc
annotate OrthancFramework/Resources/CMake/LibJpegConfiguration.cmake @ 5149:05112ff6ba22 malloc-trim
trying malloc_trim
author | Alain Mazy <am@osimis.io> |
---|---|
date | Fri, 27 Jan 2023 16:46:46 +0100 |
parents | 77e20ce39d6f |
children | 0ea402b4d901 |
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 |
4870
43e613a7756b
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4831
diff
changeset
|
4 # Copyright (C) 2017-2022 Osimis S.A., Belgium |
43e613a7756b
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4831
diff
changeset
|
5 # Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
4120
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
6 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
7 # 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
|
8 # 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
|
9 # 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
|
10 # the License, or (at your option) any later version. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
11 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
12 # 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
|
13 # WITHOUT ANY WARRANTY; without even the implied warranty of |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
14 # 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
|
15 # Lesser General Public License for more details. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
16 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
17 # 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
|
18 # License along with this program. If not, see |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
19 # <http://www.gnu.org/licenses/>. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
20 |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
21 |
1602 | 22 if (STATIC_BUILD OR NOT USE_SYSTEM_LIBJPEG) |
3286
2b547eaed193
upgrade to libjpeg 9c
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
23 set(LIBJPEG_SOURCES_DIR ${CMAKE_BINARY_DIR}/jpeg-9c) |
1602 | 24 DownloadPackage( |
3286
2b547eaed193
upgrade to libjpeg 9c
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
25 "93c62597eeef81a84d988bccbda1e990" |
2b547eaed193
upgrade to libjpeg 9c
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
26 "http://orthanc.osimis.io/ThirdPartyDownloads/jpegsrc.v9c.tar.gz" |
1602 | 27 "${LIBJPEG_SOURCES_DIR}") |
28 | |
29 include_directories( | |
30 ${LIBJPEG_SOURCES_DIR} | |
31 ) | |
32 | |
33 list(APPEND LIBJPEG_SOURCES | |
34 ${LIBJPEG_SOURCES_DIR}/jaricom.c | |
35 ${LIBJPEG_SOURCES_DIR}/jcapimin.c | |
36 ${LIBJPEG_SOURCES_DIR}/jcapistd.c | |
37 ${LIBJPEG_SOURCES_DIR}/jcarith.c | |
38 ${LIBJPEG_SOURCES_DIR}/jccoefct.c | |
39 ${LIBJPEG_SOURCES_DIR}/jccolor.c | |
40 ${LIBJPEG_SOURCES_DIR}/jcdctmgr.c | |
41 ${LIBJPEG_SOURCES_DIR}/jchuff.c | |
42 ${LIBJPEG_SOURCES_DIR}/jcinit.c | |
43 ${LIBJPEG_SOURCES_DIR}/jcmarker.c | |
44 ${LIBJPEG_SOURCES_DIR}/jcmaster.c | |
45 ${LIBJPEG_SOURCES_DIR}/jcomapi.c | |
46 ${LIBJPEG_SOURCES_DIR}/jcparam.c | |
47 ${LIBJPEG_SOURCES_DIR}/jcprepct.c | |
48 ${LIBJPEG_SOURCES_DIR}/jcsample.c | |
49 ${LIBJPEG_SOURCES_DIR}/jctrans.c | |
50 ${LIBJPEG_SOURCES_DIR}/jdapimin.c | |
51 ${LIBJPEG_SOURCES_DIR}/jdapistd.c | |
52 ${LIBJPEG_SOURCES_DIR}/jdarith.c | |
53 ${LIBJPEG_SOURCES_DIR}/jdatadst.c | |
54 ${LIBJPEG_SOURCES_DIR}/jdatasrc.c | |
55 ${LIBJPEG_SOURCES_DIR}/jdcoefct.c | |
56 ${LIBJPEG_SOURCES_DIR}/jdcolor.c | |
57 ${LIBJPEG_SOURCES_DIR}/jddctmgr.c | |
58 ${LIBJPEG_SOURCES_DIR}/jdhuff.c | |
59 ${LIBJPEG_SOURCES_DIR}/jdinput.c | |
60 ${LIBJPEG_SOURCES_DIR}/jcmainct.c | |
61 ${LIBJPEG_SOURCES_DIR}/jdmainct.c | |
62 ${LIBJPEG_SOURCES_DIR}/jdmarker.c | |
63 ${LIBJPEG_SOURCES_DIR}/jdmaster.c | |
64 ${LIBJPEG_SOURCES_DIR}/jdmerge.c | |
65 ${LIBJPEG_SOURCES_DIR}/jdpostct.c | |
66 ${LIBJPEG_SOURCES_DIR}/jdsample.c | |
67 ${LIBJPEG_SOURCES_DIR}/jdtrans.c | |
68 ${LIBJPEG_SOURCES_DIR}/jerror.c | |
69 ${LIBJPEG_SOURCES_DIR}/jfdctflt.c | |
70 ${LIBJPEG_SOURCES_DIR}/jfdctfst.c | |
71 ${LIBJPEG_SOURCES_DIR}/jfdctint.c | |
72 ${LIBJPEG_SOURCES_DIR}/jidctflt.c | |
73 ${LIBJPEG_SOURCES_DIR}/jidctfst.c | |
74 ${LIBJPEG_SOURCES_DIR}/jidctint.c | |
75 #${LIBJPEG_SOURCES_DIR}/jmemansi.c | |
76 #${LIBJPEG_SOURCES_DIR}/jmemdos.c | |
77 #${LIBJPEG_SOURCES_DIR}/jmemmac.c | |
78 ${LIBJPEG_SOURCES_DIR}/jmemmgr.c | |
79 #${LIBJPEG_SOURCES_DIR}/jmemname.c | |
80 ${LIBJPEG_SOURCES_DIR}/jmemnobs.c | |
81 ${LIBJPEG_SOURCES_DIR}/jquant1.c | |
82 ${LIBJPEG_SOURCES_DIR}/jquant2.c | |
83 ${LIBJPEG_SOURCES_DIR}/jutils.c | |
84 | |
85 # ${LIBJPEG_SOURCES_DIR}/rdbmp.c | |
86 # ${LIBJPEG_SOURCES_DIR}/rdcolmap.c | |
87 # ${LIBJPEG_SOURCES_DIR}/rdgif.c | |
88 # ${LIBJPEG_SOURCES_DIR}/rdppm.c | |
89 # ${LIBJPEG_SOURCES_DIR}/rdrle.c | |
90 # ${LIBJPEG_SOURCES_DIR}/rdswitch.c | |
91 # ${LIBJPEG_SOURCES_DIR}/rdtarga.c | |
92 # ${LIBJPEG_SOURCES_DIR}/transupp.c | |
93 # ${LIBJPEG_SOURCES_DIR}/wrbmp.c | |
94 # ${LIBJPEG_SOURCES_DIR}/wrgif.c | |
95 # ${LIBJPEG_SOURCES_DIR}/wrppm.c | |
96 # ${LIBJPEG_SOURCES_DIR}/wrrle.c | |
97 # ${LIBJPEG_SOURCES_DIR}/wrtarga.c | |
98 ) | |
99 | |
100 configure_file( | |
101 ${LIBJPEG_SOURCES_DIR}/jconfig.txt | |
102 ${LIBJPEG_SOURCES_DIR}/jconfig.h COPYONLY | |
103 ) | |
104 | |
2113
0108ac01fc8e
added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1602
diff
changeset
|
105 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
|
106 |
1602 | 107 else() |
108 include(FindJPEG) | |
109 | |
5121
77e20ce39d6f
removed some warnings for recent versions of CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4870
diff
changeset
|
110 if (NOT JPEG_FOUND) |
1602 | 111 message(FATAL_ERROR "Unable to find libjpeg") |
112 endif() | |
113 | |
114 include_directories(${JPEG_INCLUDE_DIR}) | |
115 link_libraries(${JPEG_LIBRARIES}) | |
116 endif() |