Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
d2acaf6d
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
11 个月 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d2acaf6d
编写于
4月 05, 2017
作者:
E
ebraminio
提交者:
Behdad Esfahbod
4月 05, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Split ragel generated files lists and remove hardcoded rl files lists (#453)
上级
7d64c0ef
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
71 addition
and
81 deletion
+71
-81
CMakeLists.txt
CMakeLists.txt
+53
-73
src/Makefile.am
src/Makefile.am
+2
-0
src/Makefile.sources
src/Makefile.sources
+11
-5
win32/config-msvc.mak
win32/config-msvc.mak
+5
-3
未找到文件。
CMakeLists.txt
浏览文件 @
d2acaf6d
...
...
@@ -24,7 +24,7 @@ option(HB_HAVE_CORETEXT "Enable CoreText shaper on macOS" ON)
option
(
HB_BUILTIN_UCDN
"Use HarfBuzz provided UCDN"
ON
)
include_directories
(
AFTER
${
CMAKE_CURREN
T_SOURCE_DIR
}
/src
${
PROJEC
T_SOURCE_DIR
}
/src
${
PROJECT_BINARY_DIR
}
/src
)
...
...
@@ -53,29 +53,47 @@ if (EXISTS "${PROJECT_SOURCE_DIR}/src/hb-version.h")
set
(
HB_VERSION_H
"
${
PROJECT_SOURCE_DIR
}
/src/hb-version.h"
)
endif
()
## Extract variables from src/Makefile.sources
file
(
READ
${
PROJECT_SOURCE_DIR
}
/src/Makefile.sources MAKEFILESOURCES
)
function
(
extract_make_variable variable directory
)
string
(
REGEX MATCH
"
${
variable
}
= ([^$]+)"
temp
${
MAKEFILESOURCES
}
)
string
(
REGEX REPLACE
"
\t
hb"
"
${
directory
}
/hb"
temp
${
temp
}
)
string
(
REGEX MATCHALL
"src/[^ ]+"
temp
${
temp
}
)
set
(
${
variable
}
${
temp
}
PARENT_SCOPE
)
endfunction
()
extract_make_variable
(
HB_BASE_sources
"
${
PROJECT_SOURCE_DIR
}
/src"
)
extract_make_variable
(
HB_BASE_headers
"
${
PROJECT_SOURCE_DIR
}
/src"
)
extract_make_variable
(
HB_OT_sources
"
${
PROJECT_SOURCE_DIR
}
/src"
)
extract_make_variable
(
HB_OT_headers
"
${
PROJECT_SOURCE_DIR
}
/src"
)
if
(
IN_HB_DIST
)
extract_make_variable
(
HB_BASE_RAGEL_GENERATED_sources
"
${
PROJECT_SOURCE_DIR
}
/src"
)
extract_make_variable
(
HB_OT_RAGEL_GENERATED_sources
"
${
PROJECT_SOURCE_DIR
}
/src"
)
else
()
extract_make_variable
(
HB_BASE_RAGEL_GENERATED_sources
"
${
PROJECT_BINARY_DIR
}
/src"
)
extract_make_variable
(
HB_OT_RAGEL_GENERATED_sources
"
${
PROJECT_BINARY_DIR
}
/src"
)
endif
()
##
if
(
NOT IN_HB_DIST
)
## execute ragel tasks
find_program
(
RAGEL
"ragel"
)
if
(
RAGEL
)
message
(
STATUS
"ragel found at:
${
RAGEL
}
"
)
else
(
RAGEL
)
else
()
message
(
FATAL_ERROR
"ragel not found, get it here -- http://www.complang.org/ragel/"
)
endif
(
RAGEL
)
endif
()
function
(
ragel_preproc src_dir src_sans_rl out_sfx
)
add_custom_command
(
OUTPUT
${
PROJECT_BINARY_DIR
}
/src/
${
src_sans_rl
}${
out_sfx
}
COMMAND
${
RAGEL
}
-G2 -o
${
PROJECT_BINARY_DIR
}
/src/
${
src_sans_rl
}${
out_sfx
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
src_dir
}
/
${
src_sans_rl
}
.rl -I
${
CMAKE_CURRENT_SOURCE_DIR
}
${
ARGN
}
DEPENDS
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
src_dir
}
/
${
src_sans_rl
}
.rl
foreach
(
ragel_output IN ITEMS
${
HB_BASE_RAGEL_GENERATED_sources
}
${
HB_OT_RAGEL_GENERATED_sources
}
)
string
(
REGEX MATCH
"([^/]+)
\\
.hh"
temp
${
ragel_output
}
)
set
(
target_name
${
CMAKE_MATCH_1
}
)
add_custom_command
(
OUTPUT
${
ragel_output
}
COMMAND
${
RAGEL
}
-G2 -o
${
ragel_output
}
${
PROJECT_SOURCE_DIR
}
/src/
${
target_name
}
.rl -I
${
PROJECT_SOURCE_DIR
}
${
ARGN
}
DEPENDS
${
PROJECT_SOURCE_DIR
}
/src/
${
target_name
}
.rl
)
add_custom_target
(
harfbuzz_
${
src_sans_rl
}
DEPENDS
${
PROJECT_BINARY_DIR
}
/src/
${
src_sans_rl
}
)
endfunction
(
ragel_preproc
)
ragel_preproc
(
src hb-buffer-deserialize-json .hh
)
ragel_preproc
(
src hb-buffer-deserialize-text .hh
)
ragel_preproc
(
src hb-ot-shape-complex-indic-machine .hh
)
ragel_preproc
(
src hb-ot-shape-complex-myanmar-machine .hh
)
ragel_preproc
(
src hb-ot-shape-complex-use-machine .hh
)
add_custom_target
(
harfbuzz_
${
target_name
}
DEPENDS
${
PROJECT_BINARY_DIR
}
/src/
${
target_name
}
)
endforeach
()
##
## Generate hb-version.h
...
...
@@ -97,41 +115,14 @@ if (NOT IN_HB_DIST)
##
endif
()
## Extract variables from src/Makefile.sources
file
(
READ src/Makefile.sources MAKEFILESOURCES
)
function
(
extract_make_variable variable
)
string
(
REGEX MATCH
"
${
variable
}
= ([^$]+)"
temp
${
MAKEFILESOURCES
}
)
if
(
NOT IN_HB_DIST
)
# these should be built first and will be added from a different path
string
(
REPLACE
"hb-buffer-deserialize-json.hh"
""
temp
${
temp
}
)
string
(
REPLACE
"hb-buffer-deserialize-text.hh"
""
temp
${
temp
}
)
string
(
REPLACE
"hb-ot-shape-complex-indic-machine.hh"
""
temp
${
temp
}
)
string
(
REPLACE
"hb-ot-shape-complex-myanmar-machine.hh"
""
temp
${
temp
}
)
string
(
REPLACE
"hb-ot-shape-complex-use-machine.hh"
""
temp
${
temp
}
)
endif
()
string
(
REGEX REPLACE
"
\t
hb"
"src/hb"
temp
${
temp
}
)
string
(
REGEX MATCHALL
"src/[^ ]+"
temp
${
temp
}
)
set
(
${
variable
}
${
temp
}
PARENT_SCOPE
)
endfunction
(
extract_make_variable
)
extract_make_variable
(
HB_BASE_sources
)
extract_make_variable
(
HB_BASE_headers
)
extract_make_variable
(
HB_OT_sources
)
extract_make_variable
(
HB_OT_headers
)
##
## Define source and headers of projects
if
(
NOT IN_HB_DIST
)
set
(
project_sources
${
project
_sources
}
set
(
project_sources
${
HB_BASE_sources
}
${
HB_BASE_RAGEL_GENERATED
_sources
}
${
PROJECT_BINARY_DIR
}
/src/hb-buffer-deserialize-json.hh
${
PROJECT_BINARY_DIR
}
/src/hb-buffer-deserialize-text.hh
${
PROJECT_BINARY_DIR
}
/src/hb-ot-shape-complex-indic-machine.hh
${
PROJECT_BINARY_DIR
}
/src/hb-ot-shape-complex-myanmar-machine.hh
${
PROJECT_BINARY_DIR
}
/src/hb-ot-shape-complex-use-machine.hh
)
endif
()
${
HB_OT_sources
}
${
HB_OT_RAGEL_GENERATED_sources
}
)
set
(
project_headers
${
HB_VERSION_H
}
...
...
@@ -140,13 +131,6 @@ set(project_headers
${
HB_OT_headers
}
)
set
(
project_sources
${
project_sources
}
${
HB_BASE_sources
}
${
HB_OT_sources
}
)
if
(
HB_HAVE_FREETYPE
)
set
(
FREETYPE_DIR
"$ENV{FREETYPE_DIR}"
CACHE PATH
"root path for freetype lib/ and include/ folders"
...
...
@@ -173,27 +157,26 @@ if (HB_HAVE_FREETYPE)
endif
()
if
(
FREETYPE_INCLUDE_DIR AND FREETYPE_ACTUAL_LIBRARY
)
set
(
THIRD_PARTY_LIBS
${
THIRD_PARTY_LIBS
}
${
FREETYPE_ACTUAL_LIBRARY
}
)
set
(
THIRD_PARTY_LIBS
${
THIRD_PARTY_LIBS
}
${
FREETYPE_ACTUAL_LIBRARY
}
)
add_definitions
(
-DHAVE_FREETYPE=1 -DHAVE_FT_FACE_GETCHARVARIANTINDEX=1
)
endif
()
set
(
project_headers
${
project_headers
}
src/hb-ft.h
)
set
(
project_sources
${
project_sources
}
src/hb-ft.cc
)
set
(
project_sources
${
project_sources
}
${
PROJECT_SOURCE_DIR
}
/src/hb-ft.cc
)
set
(
project_headers
${
project_headers
}
${
PROJECT_SOURCE_DIR
}
/src/hb-ft.h
)
endif
()
if
(
HB_BUILTIN_UCDN
)
include_directories
(
src/hb-ucdn
)
add_definitions
(
-DHAVE_UCDN
)
set
(
project_headers
${
project_headers
}
src/hb-ucdn/ucdn.h
)
set
(
project_headers
${
project_headers
}
${
PROJECT_SOURCE_DIR
}
/
src/hb-ucdn/ucdn.h
)
set
(
project_sources
${
project_sources
}
src/hb-ucdn.cc
src/hb-ucdn/ucdn.c
src/hb-ucdn/unicodedata_db.h
)
${
PROJECT_SOURCE_DIR
}
/
src/hb-ucdn.cc
${
PROJECT_SOURCE_DIR
}
/
src/hb-ucdn/ucdn.c
${
PROJECT_SOURCE_DIR
}
/
src/hb-ucdn/unicodedata_db.h
)
else
()
add_definitions
(
-DHB_NO_UNICODE_FUNCS
)
endif
()
...
...
@@ -202,9 +185,8 @@ if (APPLE AND HB_HAVE_CORETEXT)
# Apple Advanced Typography
add_definitions
(
-DHAVE_CORETEXT
)
set
(
project_headers
${
project_headers
}
src/hb-coretext.h
)
set
(
project_sources
${
project_sources
}
src/hb-coretext.cc
)
set
(
project_sources
${
project_sources
}
${
PROJECT_SOURCE_DIR
}
/src/hb-coretext.cc
)
set
(
project_headers
${
project_headers
}
${
PROJECT_SOURCE_DIR
}
/src/hb-coretext.h
)
find_library
(
APPLICATION_SERVICES_FRAMEWORK ApplicationServices
)
mark_as_advanced
(
APPLICATION_SERVICES_FRAMEWORK
)
...
...
@@ -216,9 +198,8 @@ endif ()
if
(
WIN32 AND HB_HAVE_UNISCRIBE
)
add_definitions
(
-DHAVE_UNISCRIBE
)
set
(
project_headers
${
project_headers
}
src/hb-uniscribe.h
)
set
(
project_sources
${
project_sources
}
src/hb-uniscribe.cc
)
set
(
project_sources
${
project_sources
}
${
PROJECT_SOURCE_DIR
}
/src/hb-uniscribe.cc
)
set
(
project_headers
${
project_headers
}
${
PROJECT_SOURCE_DIR
}
/src/hb-uniscribe.h
)
set
(
THIRD_PARTY_LIBS
${
THIRD_PARTY_LIBS
}
usp10 gdi32 rpcrt4
)
endif
()
...
...
@@ -226,9 +207,8 @@ endif ()
if
(
WIN32 AND HB_HAVE_DIRECTWRITE
)
add_definitions
(
-DHAVE_DIRECTWRITE
)
set
(
project_headers
${
project_headers
}
src/hb-directwrite.h
)
set
(
project_sources
${
project_sources
}
src/hb-directwrite.cc
)
set
(
project_sources
${
project_sources
}
${
PROJECT_SOURCE_DIR
}
/src/hb-directwrite.cc
)
set
(
project_headers
${
project_headers
}
${
PROJECT_SOURCE_DIR
}
/src/hb-directwrite.h
)
set
(
THIRD_PARTY_LIBS
${
THIRD_PARTY_LIBS
}
dwrite rpcrt4
)
endif
()
...
...
@@ -251,4 +231,4 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
RUNTIME DESTINATION bin
)
endif
()
##
\ No newline at end of file
##
src/Makefile.am
浏览文件 @
d2acaf6d
...
...
@@ -25,11 +25,13 @@ HBLIBS =
HBNONPCLIBS
=
HBDEPS
=
HBSOURCES
=
$(HB_BASE_sources)
HBSOURCES
+=
$(HB_BASE_RAGEL_GENERATED_sources)
HBHEADERS
=
$(HB_BASE_headers)
HBNODISTHEADERS
=
$(HB_NODIST_headers)
if
HAVE_OT
HBSOURCES
+=
$(HB_OT_sources)
HBSOURCES
+=
$(HB_OT_RAGEL_GENERATED_sources)
HBHEADERS
+=
$(HB_OT_headers)
endif
...
...
src/Makefile.sources
浏览文件 @
d2acaf6d
...
...
@@ -5,8 +5,6 @@ NULL =
HB_BASE_sources
=
\
hb-atomic-private.hh
\
hb-blob.cc
\
hb-buffer-deserialize-json.hh
\
hb-buffer-deserialize-text.hh
\
hb-buffer-private.hh
\
hb-buffer-serialize.cc
\
hb-buffer.cc
\
...
...
@@ -47,6 +45,11 @@ HB_BASE_sources = \
hb-warning.cc
\
$(NULL)
HB_BASE_RAGEL_GENERATED_sources
=
\
hb-buffer-deserialize-json.hh
\
hb-buffer-deserialize-text.hh
\
$(NULL)
HB_BASE_headers
=
\
hb.h
\
hb-blob.h
\
...
...
@@ -91,15 +94,12 @@ HB_OT_sources = \
hb-ot-shape-complex-hangul.cc
\
hb-ot-shape-complex-hebrew.cc
\
hb-ot-shape-complex-indic.cc
\
hb-ot-shape-complex-indic-machine.hh
\
hb-ot-shape-complex-indic-private.hh
\
hb-ot-shape-complex-indic-table.cc
\
hb-ot-shape-complex-myanmar.cc
\
hb-ot-shape-complex-myanmar-machine.hh
\
hb-ot-shape-complex-thai.cc
\
hb-ot-shape-complex-tibetan.cc
\
hb-ot-shape-complex-use.cc
\
hb-ot-shape-complex-use-machine.hh
\
hb-ot-shape-complex-use-private.hh
\
hb-ot-shape-complex-use-table.cc
\
hb-ot-shape-complex-private.hh
\
...
...
@@ -115,6 +115,12 @@ HB_OT_sources = \
hb-ot-var-mvar-table.hh
\
$(NULL)
HB_OT_RAGEL_GENERATED_sources
=
\
hb-ot-shape-complex-indic-machine.hh
\
hb-ot-shape-complex-myanmar-machine.hh
\
hb-ot-shape-complex-use-machine.hh
\
$(NULL)
HB_OT_headers
=
\
hb-ot.h
\
hb-ot-font.h
\
...
...
win32/config-msvc.mak
浏览文件 @
d2acaf6d
...
...
@@ -36,9 +36,11 @@ HB_DEFINES =
HB_CFLAGS
=
/DHAVE_CONFIG_H
HB_UCDN_CFLAGS
=
/I..
\s
rc
\h
b-ucdn
HB_SOURCES
=
\
$(HB_BASE_sources)
\
$(HB_FALLBACK_sources)
\
$(HB_OT_sources)
$(HB_BASE_sources)
\
$(HB_BASE_RAGEL_GENERATED_sources)
\
$(HB_FALLBACK_sources)
\
$(HB_OT_sources)
\
$(HB_OT_RAGEL_GENERATED_sources)
HB_HEADERS
=
\
$(HB_BASE_headers)
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录