annotate Resources/CMake/FreetypeConfiguration.cmake @ 686:0d42bda615a8 am-dev

fix codegen tests
author Alain Mazy <alain@mazy.be>
date Thu, 16 May 2019 16:45:10 +0200
parents 529c9617654b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
576
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 if (STATIC_BUILD OR NOT USE_SYSTEM_FREETYPE)
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 set(FREETYPE_SOURCES_DIR ${CMAKE_BINARY_DIR}/freetype-2.9.1)
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 set(FREETYPE_URL "http://orthanc.osimis.io/ThirdPartyDownloads/freetype-2.9.1.tar.gz")
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 set(FREETYPE_MD5 "3adb0e35d3c100c456357345ccfa8056")
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 DownloadPackage(${FREETYPE_MD5} ${FREETYPE_URL} "${FREETYPE_SOURCES_DIR}")
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 include_directories(BEFORE
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 ${FREETYPE_SOURCES_DIR}/include/
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 )
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 add_definitions(
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 -DFT2_BUILD_LIBRARY
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 -DFT_CONFIG_OPTION_NO_ASSEMBLER
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 )
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 set(FREETYPE_SOURCES
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 ${FREETYPE_SOURCES_DIR}/src/autofit/autofit.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 ${FREETYPE_SOURCES_DIR}/src/base/ftbase.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 ${FREETYPE_SOURCES_DIR}/src/base/ftbbox.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 ${FREETYPE_SOURCES_DIR}/src/base/ftbdf.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 ${FREETYPE_SOURCES_DIR}/src/base/ftbitmap.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 ${FREETYPE_SOURCES_DIR}/src/base/ftcid.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 ${FREETYPE_SOURCES_DIR}/src/base/ftfstype.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 ${FREETYPE_SOURCES_DIR}/src/base/ftgasp.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 ${FREETYPE_SOURCES_DIR}/src/base/ftglyph.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 ${FREETYPE_SOURCES_DIR}/src/base/ftgxval.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 ${FREETYPE_SOURCES_DIR}/src/base/ftinit.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 ${FREETYPE_SOURCES_DIR}/src/base/ftmm.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 ${FREETYPE_SOURCES_DIR}/src/base/ftotval.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 ${FREETYPE_SOURCES_DIR}/src/base/ftpatent.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 ${FREETYPE_SOURCES_DIR}/src/base/ftpfr.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 ${FREETYPE_SOURCES_DIR}/src/base/ftstroke.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 ${FREETYPE_SOURCES_DIR}/src/base/ftsynth.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 ${FREETYPE_SOURCES_DIR}/src/base/ftsystem.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 ${FREETYPE_SOURCES_DIR}/src/base/fttype1.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 ${FREETYPE_SOURCES_DIR}/src/base/ftwinfnt.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 ${FREETYPE_SOURCES_DIR}/src/bdf/bdf.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 ${FREETYPE_SOURCES_DIR}/src/bzip2/ftbzip2.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 ${FREETYPE_SOURCES_DIR}/src/cache/ftcache.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 ${FREETYPE_SOURCES_DIR}/src/cff/cff.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 ${FREETYPE_SOURCES_DIR}/src/cid/type1cid.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 ${FREETYPE_SOURCES_DIR}/src/gzip/ftgzip.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 ${FREETYPE_SOURCES_DIR}/src/lzw/ftlzw.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 ${FREETYPE_SOURCES_DIR}/src/pcf/pcf.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 ${FREETYPE_SOURCES_DIR}/src/pfr/pfr.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 ${FREETYPE_SOURCES_DIR}/src/psaux/psaux.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 ${FREETYPE_SOURCES_DIR}/src/pshinter/pshinter.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 ${FREETYPE_SOURCES_DIR}/src/psnames/psnames.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 ${FREETYPE_SOURCES_DIR}/src/raster/raster.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 ${FREETYPE_SOURCES_DIR}/src/sfnt/sfnt.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 ${FREETYPE_SOURCES_DIR}/src/smooth/smooth.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 ${FREETYPE_SOURCES_DIR}/src/truetype/truetype.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 ${FREETYPE_SOURCES_DIR}/src/type1/type1.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 ${FREETYPE_SOURCES_DIR}/src/type42/type42.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 ${FREETYPE_SOURCES_DIR}/src/winfonts/winfnt.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 )
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 list(APPEND FREETYPE_SOURCES
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 ${FREETYPE_SOURCES_DIR}/builds/windows/ftdebug.c
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 )
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 endif()
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 foreach(header
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 ${FREETYPE_SOURCES_DIR}/include/freetype/config/ftconfig.h
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 ${FREETYPE_SOURCES_DIR}/include/freetype/config/ftoption.h
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 )
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 set_source_files_properties(
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 ${FREETYPE_SOURCES}
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 PROPERTIES OBJECT_DEPENDS ${header}
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 )
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 endforeach()
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 source_group(ThirdParty\\Freetype REGULAR_EXPRESSION ${FREETYPE_SOURCES_DIR}/.*)
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 else()
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 include(FindFreetype)
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 if (NOT FREETYPE_FOUND)
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 message(FATAL_ERROR "Please install the libfreetype6-dev package")
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 endif()
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 include_directories(${FREETYPE_INCLUDE_DIRS})
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 link_libraries(${FREETYPE_LIBRARIES})
529c9617654b FontRenderer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 endif()