-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathCMakeLists.txt
124 lines (108 loc) · 3.46 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
project(gltext)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${gltext_SOURCE_DIR}/cmake/")
set(HB_SOURCES
harfbuzz/hb-blob.cc
harfbuzz/hb-buffer-private.hh
harfbuzz/hb-buffer.cc
harfbuzz/hb-common.cc
harfbuzz/hb-fallback-shape-private.hh
harfbuzz/hb-fallback-shape.cc
harfbuzz/hb-font-private.hh
harfbuzz/hb-font.cc
harfbuzz/hb-ft.cc
harfbuzz/hb-mutex-private.hh
harfbuzz/hb-object-private.hh
harfbuzz/hb-open-file-private.hh
harfbuzz/hb-open-type-private.hh
harfbuzz/hb-ot-head-table.hh
harfbuzz/hb-ot-hhea-table.hh
harfbuzz/hb-ot-hmtx-table.hh
harfbuzz/hb-ot-layout-common-private.hh
harfbuzz/hb-ot-layout-gpos-table.hh
harfbuzz/hb-ot-layout-gsub-table.hh
harfbuzz/hb-ot-layout-gsubgpos-private.hh
harfbuzz/hb-ot-layout-private.hh
harfbuzz/hb-ot-layout.cc
harfbuzz/hb-ot-map-private.hh
harfbuzz/hb-ot-map.cc
harfbuzz/hb-ot-maxp-table.hh
harfbuzz/hb-ot-name-table.hh
harfbuzz/hb-ot-shape-complex-arabic-table.hh
harfbuzz/hb-ot-shape-complex-arabic.cc
harfbuzz/hb-ot-shape-complex-indic-table.hh
harfbuzz/hb-ot-shape-complex-indic.cc
harfbuzz/hb-ot-shape-complex-misc.cc
harfbuzz/hb-ot-shape-complex-private.hh
harfbuzz/hb-ot-shape-normalize.cc
harfbuzz/hb-ot-shape.cc
harfbuzz/hb-ot-tag.cc
harfbuzz/hb-private.hh
harfbuzz/hb-shape.cc
harfbuzz/hb-unicode-private.hh
harfbuzz/hb-unicode.cc
harfbuzz/hb.h
harfbuzz/hb-blob.h
harfbuzz/hb-buffer.h
harfbuzz/hb-common.h
harfbuzz/hb-font.h
harfbuzz/hb-ft.h
harfbuzz/hb-ot-layout.h
harfbuzz/hb-ot-shape.h
harfbuzz/hb-ot-tag.h
harfbuzz/hb-ot.h
harfbuzz/hb-shape.h
harfbuzz/hb-unicode.h
harfbuzz/hb-version.h
)
set(GLTEXT_SOURCES
gltext.cpp
)
set(GLTEXT_HEADERS
gltext.hpp
)
find_package(Graphite2)
find_package(Uniscribe)
find_package(GLUT)
find_package(OpenGL REQUIRED)
find_package(Freetype REQUIRED)
include_directories(${FREETYPE_INCLUDE_DIRS})
add_definitions(-DHAVE_OT=1)
if(GRAPHITE2_FOUND)
set(HB_SOURCES ${HB_SOURCES}
harfbuzz/hb-graphite2.cc
harfbuzz/hb-graphite2.h
)
set(HB_EXTRA_LIBS ${GRAPHITE2_LIBRARY})
add_definitions(-DHAVE_GRAPHITE=1)
endif()
if(UNISCRIBE_FOUND)
option(GLTEXT_USE_UNISCRIBE "Enable uniscribe. This will cause gltext and your application to require Windows Vista or newer" FALSE)
if(GLTEXT_USE_UNISCRIBE)
set(HB_SOURCES ${HB_SOURCES}
harfbuzz/hb-uniscribe.cc
harfbuzz/hb-uniscribe.h
)
set(HB_EXTRA_LIBS ${UNISCRIBE_LIBRARY})
add_definitions(-DHAVE_UNISCRIBE=1)
endif()
endif()
add_library(gltext ${GLTEXT_SOURCES} ${GLTEXT_HEADERS} ${HB_SOURCES})
if(GLUT_FOUND)
option(GLTEXT_BUILD_DEMO_TEST "Build the demo 'test' program" FALSE)
if(GLTEXT_BUILD_DEMO_TEST)
add_executable(test test.cpp)
target_link_libraries(test ${FREETYPE_LIBRARY} ${HB_EXTRA_LIBS} ${OPENGL_gl_LIBRARY} ${GLUT_LIBRARIES} gltext )
endif()
endif()
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
option(GLTEXT_DO_INSTALL "Add install targets for gltext libraries" TRUE)
else()
option(GLTEXT_DO_INSTALL "Add install targets for gltext libraries" FALSE)
set(GLTEXT_LIBRARIES gltext ${FREETYPE_LIBRARY} ${HB_EXTRA_LIBS} ${OPENGL_gl_LIBRARY} PARENT_SCOPE)
endif()
if(GLTEXT_DO_INSTALL)
install(TARGETS gltext DESTINATION lib)
install(FILES ${GLTEXT_HEADERS} DESTINATION include)
endif()
source_group("harbuzz" FILES ${HB_SOURCES})