Mercurial > hg > orthanc-stone
annotate OrthancStone/Resources/CMake/FreetypeConfiguration.cmake @ 1852:5ead1852095a StoneWebViewer-2.1
StoneWebViewer-2.1
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 29 Jun 2021 16:26:47 +0200 |
parents | 9ac2a65d4172 |
children | 3889ae96d2e9 |
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 |
1739
9ac2a65d4172
upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
4 # Copyright (C) 2017-2021 Osimis S.A., Belgium |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
5 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
6 # 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
|
7 # 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
|
8 # 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
|
9 # the License, or (at your option) any later version. |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
10 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
11 # 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
|
12 # 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
|
13 # 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
|
14 # Lesser General Public License for more details. |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
15 # |
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
|
16 # 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
|
17 # 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
|
18 # <http://www.gnu.org/licenses/>. |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
19 |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
20 |
576 | 21 if (STATIC_BUILD OR NOT USE_SYSTEM_FREETYPE) |
22 set(FREETYPE_SOURCES_DIR ${CMAKE_BINARY_DIR}/freetype-2.9.1) | |
23 set(FREETYPE_URL "http://orthanc.osimis.io/ThirdPartyDownloads/freetype-2.9.1.tar.gz") | |
24 set(FREETYPE_MD5 "3adb0e35d3c100c456357345ccfa8056") | |
25 | |
26 DownloadPackage(${FREETYPE_MD5} ${FREETYPE_URL} "${FREETYPE_SOURCES_DIR}") | |
27 | |
28 include_directories(BEFORE | |
29 ${FREETYPE_SOURCES_DIR}/include/ | |
30 ) | |
31 | |
32 add_definitions( | |
33 -DFT2_BUILD_LIBRARY | |
34 -DFT_CONFIG_OPTION_NO_ASSEMBLER | |
35 ) | |
36 | |
37 set(FREETYPE_SOURCES | |
38 ${FREETYPE_SOURCES_DIR}/src/autofit/autofit.c | |
39 ${FREETYPE_SOURCES_DIR}/src/base/ftbase.c | |
40 ${FREETYPE_SOURCES_DIR}/src/base/ftbbox.c | |
41 ${FREETYPE_SOURCES_DIR}/src/base/ftbdf.c | |
42 ${FREETYPE_SOURCES_DIR}/src/base/ftbitmap.c | |
43 ${FREETYPE_SOURCES_DIR}/src/base/ftcid.c | |
44 ${FREETYPE_SOURCES_DIR}/src/base/ftfstype.c | |
45 ${FREETYPE_SOURCES_DIR}/src/base/ftgasp.c | |
46 ${FREETYPE_SOURCES_DIR}/src/base/ftglyph.c | |
47 ${FREETYPE_SOURCES_DIR}/src/base/ftgxval.c | |
48 ${FREETYPE_SOURCES_DIR}/src/base/ftinit.c | |
49 ${FREETYPE_SOURCES_DIR}/src/base/ftmm.c | |
50 ${FREETYPE_SOURCES_DIR}/src/base/ftotval.c | |
51 ${FREETYPE_SOURCES_DIR}/src/base/ftpatent.c | |
52 ${FREETYPE_SOURCES_DIR}/src/base/ftpfr.c | |
53 ${FREETYPE_SOURCES_DIR}/src/base/ftstroke.c | |
54 ${FREETYPE_SOURCES_DIR}/src/base/ftsynth.c | |
55 ${FREETYPE_SOURCES_DIR}/src/base/ftsystem.c | |
56 ${FREETYPE_SOURCES_DIR}/src/base/fttype1.c | |
57 ${FREETYPE_SOURCES_DIR}/src/base/ftwinfnt.c | |
58 ${FREETYPE_SOURCES_DIR}/src/bdf/bdf.c | |
59 ${FREETYPE_SOURCES_DIR}/src/bzip2/ftbzip2.c | |
60 ${FREETYPE_SOURCES_DIR}/src/cache/ftcache.c | |
61 ${FREETYPE_SOURCES_DIR}/src/cff/cff.c | |
62 ${FREETYPE_SOURCES_DIR}/src/cid/type1cid.c | |
63 ${FREETYPE_SOURCES_DIR}/src/gzip/ftgzip.c | |
64 ${FREETYPE_SOURCES_DIR}/src/lzw/ftlzw.c | |
65 ${FREETYPE_SOURCES_DIR}/src/pcf/pcf.c | |
66 ${FREETYPE_SOURCES_DIR}/src/pfr/pfr.c | |
67 ${FREETYPE_SOURCES_DIR}/src/psaux/psaux.c | |
68 ${FREETYPE_SOURCES_DIR}/src/pshinter/pshinter.c | |
69 ${FREETYPE_SOURCES_DIR}/src/psnames/psnames.c | |
70 ${FREETYPE_SOURCES_DIR}/src/raster/raster.c | |
71 ${FREETYPE_SOURCES_DIR}/src/sfnt/sfnt.c | |
72 ${FREETYPE_SOURCES_DIR}/src/smooth/smooth.c | |
73 ${FREETYPE_SOURCES_DIR}/src/truetype/truetype.c | |
74 ${FREETYPE_SOURCES_DIR}/src/type1/type1.c | |
75 ${FREETYPE_SOURCES_DIR}/src/type42/type42.c | |
76 ${FREETYPE_SOURCES_DIR}/src/winfonts/winfnt.c | |
77 ) | |
78 | |
79 if (CMAKE_SYSTEM_NAME STREQUAL "Windows") | |
80 list(APPEND FREETYPE_SOURCES | |
81 ${FREETYPE_SOURCES_DIR}/builds/windows/ftdebug.c | |
82 ) | |
83 endif() | |
84 | |
85 foreach(header | |
86 ${FREETYPE_SOURCES_DIR}/include/freetype/config/ftconfig.h | |
87 ${FREETYPE_SOURCES_DIR}/include/freetype/config/ftoption.h | |
88 ) | |
89 | |
90 set_source_files_properties( | |
91 ${FREETYPE_SOURCES} | |
92 PROPERTIES OBJECT_DEPENDS ${header} | |
93 ) | |
94 endforeach() | |
95 | |
96 source_group(ThirdParty\\Freetype REGULAR_EXPRESSION ${FREETYPE_SOURCES_DIR}/.*) | |
97 | |
98 else() | |
99 include(FindFreetype) | |
100 | |
101 if (NOT FREETYPE_FOUND) | |
102 message(FATAL_ERROR "Please install the libfreetype6-dev package") | |
103 endif() | |
104 | |
105 include_directories(${FREETYPE_INCLUDE_DIRS}) | |
106 link_libraries(${FREETYPE_LIBRARIES}) | |
107 endif() |