Mercurial > hg > orthanc-stone
annotate OrthancStone/Resources/CMake/FreetypeConfiguration.cmake @ 2146:743fa9c74443 dicom-sr tip
integration mainline->dicom-sr
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 16 Aug 2024 18:09:53 +0200 |
parents | 16c01cc201e7 |
children |
rev | line source |
---|---|
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
1 # Stone of Orthanc |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
3 # Department, University Hospital of Liege, Belgium |
2124
16c01cc201e7
updated copyright, as Osimis is not active on Orthanc anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2114
diff
changeset
|
4 # Copyright (C) 2017-2023 Osimis S.A., Belgium |
2114
c23eef785569
update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2111
diff
changeset
|
5 # Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
6 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
7 # This program is free software: you can redistribute it and/or |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
8 # modify it under the terms of the GNU Lesser General Public License |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
9 # as published by the Free Software Foundation, either version 3 of |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
10 # the License, or (at your option) any later version. |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
11 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
12 # This program is distributed in the hope that it will be useful, but |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
13 # WITHOUT ANY WARRANTY; without even the implied warranty of |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
15 # Lesser General Public License for more details. |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
16 # |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
17 # You should have received a copy of the GNU Lesser General Public |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
18 # License along with this program. If not, see |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
19 # <http://www.gnu.org/licenses/>. |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
20 |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
21 |
576 | 22 if (STATIC_BUILD OR NOT USE_SYSTEM_FREETYPE) |
23 set(FREETYPE_SOURCES_DIR ${CMAKE_BINARY_DIR}/freetype-2.9.1) | |
2111
f8f80e432abc
third party downloads from uclouvain servers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2077
diff
changeset
|
24 set(FREETYPE_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/freetype-2.9.1.tar.gz") |
576 | 25 set(FREETYPE_MD5 "3adb0e35d3c100c456357345ccfa8056") |
26 | |
27 DownloadPackage(${FREETYPE_MD5} ${FREETYPE_URL} "${FREETYPE_SOURCES_DIR}") | |
28 | |
29 include_directories(BEFORE | |
30 ${FREETYPE_SOURCES_DIR}/include/ | |
31 ) | |
32 | |
33 add_definitions( | |
34 -DFT2_BUILD_LIBRARY | |
35 -DFT_CONFIG_OPTION_NO_ASSEMBLER | |
36 ) | |
37 | |
38 set(FREETYPE_SOURCES | |
39 ${FREETYPE_SOURCES_DIR}/src/autofit/autofit.c | |
40 ${FREETYPE_SOURCES_DIR}/src/base/ftbase.c | |
41 ${FREETYPE_SOURCES_DIR}/src/base/ftbbox.c | |
42 ${FREETYPE_SOURCES_DIR}/src/base/ftbdf.c | |
43 ${FREETYPE_SOURCES_DIR}/src/base/ftbitmap.c | |
44 ${FREETYPE_SOURCES_DIR}/src/base/ftcid.c | |
45 ${FREETYPE_SOURCES_DIR}/src/base/ftfstype.c | |
46 ${FREETYPE_SOURCES_DIR}/src/base/ftgasp.c | |
47 ${FREETYPE_SOURCES_DIR}/src/base/ftglyph.c | |
48 ${FREETYPE_SOURCES_DIR}/src/base/ftgxval.c | |
49 ${FREETYPE_SOURCES_DIR}/src/base/ftinit.c | |
50 ${FREETYPE_SOURCES_DIR}/src/base/ftmm.c | |
51 ${FREETYPE_SOURCES_DIR}/src/base/ftotval.c | |
52 ${FREETYPE_SOURCES_DIR}/src/base/ftpatent.c | |
53 ${FREETYPE_SOURCES_DIR}/src/base/ftpfr.c | |
54 ${FREETYPE_SOURCES_DIR}/src/base/ftstroke.c | |
55 ${FREETYPE_SOURCES_DIR}/src/base/ftsynth.c | |
56 ${FREETYPE_SOURCES_DIR}/src/base/ftsystem.c | |
57 ${FREETYPE_SOURCES_DIR}/src/base/fttype1.c | |
58 ${FREETYPE_SOURCES_DIR}/src/base/ftwinfnt.c | |
59 ${FREETYPE_SOURCES_DIR}/src/bdf/bdf.c | |
60 ${FREETYPE_SOURCES_DIR}/src/bzip2/ftbzip2.c | |
61 ${FREETYPE_SOURCES_DIR}/src/cache/ftcache.c | |
62 ${FREETYPE_SOURCES_DIR}/src/cff/cff.c | |
63 ${FREETYPE_SOURCES_DIR}/src/cid/type1cid.c | |
64 ${FREETYPE_SOURCES_DIR}/src/gzip/ftgzip.c | |
65 ${FREETYPE_SOURCES_DIR}/src/lzw/ftlzw.c | |
66 ${FREETYPE_SOURCES_DIR}/src/pcf/pcf.c | |
67 ${FREETYPE_SOURCES_DIR}/src/pfr/pfr.c | |
68 ${FREETYPE_SOURCES_DIR}/src/psaux/psaux.c | |
69 ${FREETYPE_SOURCES_DIR}/src/pshinter/pshinter.c | |
70 ${FREETYPE_SOURCES_DIR}/src/psnames/psnames.c | |
71 ${FREETYPE_SOURCES_DIR}/src/raster/raster.c | |
72 ${FREETYPE_SOURCES_DIR}/src/sfnt/sfnt.c | |
73 ${FREETYPE_SOURCES_DIR}/src/smooth/smooth.c | |
74 ${FREETYPE_SOURCES_DIR}/src/truetype/truetype.c | |
75 ${FREETYPE_SOURCES_DIR}/src/type1/type1.c | |
76 ${FREETYPE_SOURCES_DIR}/src/type42/type42.c | |
77 ${FREETYPE_SOURCES_DIR}/src/winfonts/winfnt.c | |
78 ) | |
79 | |
80 if (CMAKE_SYSTEM_NAME STREQUAL "Windows") | |
81 list(APPEND FREETYPE_SOURCES | |
82 ${FREETYPE_SOURCES_DIR}/builds/windows/ftdebug.c | |
83 ) | |
84 endif() | |
85 | |
86 foreach(header | |
87 ${FREETYPE_SOURCES_DIR}/include/freetype/config/ftconfig.h | |
88 ${FREETYPE_SOURCES_DIR}/include/freetype/config/ftoption.h | |
89 ) | |
90 | |
91 set_source_files_properties( | |
92 ${FREETYPE_SOURCES} | |
93 PROPERTIES OBJECT_DEPENDS ${header} | |
94 ) | |
95 endforeach() | |
96 | |
97 source_group(ThirdParty\\Freetype REGULAR_EXPRESSION ${FREETYPE_SOURCES_DIR}/.*) | |
98 | |
99 else() | |
100 include(FindFreetype) | |
101 | |
102 if (NOT FREETYPE_FOUND) | |
103 message(FATAL_ERROR "Please install the libfreetype6-dev package") | |
104 endif() | |
105 | |
106 include_directories(${FREETYPE_INCLUDE_DIRS}) | |
107 link_libraries(${FREETYPE_LIBRARIES}) | |
108 endif() |