Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
694cb1be
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
1 年多 前同步成功
通知
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看板
未验证
提交
694cb1be
编写于
4月 19, 2019
作者:
E
Ebrahim Byagowi
提交者:
GitHub
4月 19, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add harfbuzzjs build configuration (#1636)
上级
42f4bd6b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
35 addition
and
0 deletion
+35
-0
CMakeLists.txt
CMakeLists.txt
+35
-0
未找到文件。
CMakeLists.txt
浏览文件 @
694cb1be
...
...
@@ -85,6 +85,10 @@ if (HB_CHECK)
endif
()
endif
()
# https://github.com/harfbuzz/harfbuzzjs/
# emcmake cmake -Bwasmbuild -H. -GNinja -DHB_HARFBUZZJS=1 && ninja -Cwasmbuild
option
(
HB_HARFBUZZJS
"Enable our opinionated harfbuzzjs related build optimization"
OFF
)
include_directories
(
AFTER
${
PROJECT_SOURCE_DIR
}
/src
${
PROJECT_BINARY_DIR
}
/src
...
...
@@ -295,6 +299,16 @@ if (HB_HAVE_GRAPHITE2)
mark_as_advanced
(
GRAPHITE2_INCLUDE_DIR GRAPHITE2_LIBRARY
)
endif
()
if
(
HB_HARFBUZZJS
)
# we won't need multithread support in harfbuzzjs
add_definitions
(
-DHB_NO_MT
)
add_definitions
(
-DHB_NO_OPTIONS -DHB_NO_OT_FONT_CFF -DHB_NO_NAME_TABLE_AAT
-DHB_NO_OT_FONT_BITMAP -DHB_NO_OT_SHAPE_COMPLEX_HEBREW_FALLBACK
-DHB_NO_OT_SHAPE_FALLBACK -DHB_NO_OT_SHAPE_COMPLEX_THAI_FALLBACK
-DHB_NO_OT_LAYOUT_BLACKLIST -DHB_NO_OT_SHAPE_COMPLEX_VOWEL_CONSTRAINTS
)
endif
()
if
(
HB_BUILTIN_UCDN
)
include_directories
(
src/hb-ucdn
)
add_definitions
(
-DHAVE_UCDN
)
...
...
@@ -538,6 +552,27 @@ endif ()
add_library
(
harfbuzz
${
project_sources
}
${
project_extra_sources
}
${
project_headers
}
)
target_link_libraries
(
harfbuzz
${
THIRD_PARTY_LIBS
}
)
if
(
HB_HARFBUZZJS
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++11 -s MODULARIZE=1 \
-s NO_FILESYSTEM=1 -s ALLOW_MEMORY_GROWTH=1 -s NO_EXIT_RUNTIME=1 -s STRICT=1 \
-Oz --closure 1"
)
# add_definitions("-DHB_EXTERN=__attribute__((used))")
# Alternatively, only the needed calls
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-s
\"
EXPORTED_FUNCTIONS=['_hb_version_string', \
'_malloc', '_hb_blob_create', '_hb_face_create', '_hb_font_create', \
'_hb_buffer_create', '_hb_buffer_add_utf8', '_hb_buffer_guess_segment_properties', \
'_hb_buffer_set_direction', '_hb_shape', '_hb_buffer_serialize_glyphs', \
'_hb_buffer_get_length', '_hb_buffer_serialize_glyphs', '_hb_buffer_destroy', \
'_hb_font_destroy', '_hb_face_destroy', '_hb_blob_destroy', '_hb_blob_get_length', \
'_hb_direction_from_string', '_free']
\"
"
)
# Trick emscripten to create js/wasm from a library
add_executable
(
harfbuzzjs /dev/null
)
target_link_libraries
(
harfbuzzjs harfbuzz
)
endif
()
## Define harfbuzz-subset library
if
(
HB_BUILD_SUBSET
)
add_library
(
harfbuzz-subset
${
subset_project_sources
}
${
subset_project_headers
}
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录