Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
0eec3315
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看板
未验证
提交
0eec3315
编写于
2月 28, 2018
作者:
E
Ebrahim Byagowi
提交者:
GitHub
2月 28, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[cmake] cleanup (#846)
上级
4c6023f8
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
30 addition
and
42 deletion
+30
-42
CMakeLists.txt
CMakeLists.txt
+29
-41
test/api/CMakeLists.txt
test/api/CMakeLists.txt
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
0eec3315
...
@@ -63,7 +63,6 @@ if (HB_HAVE_INTROSPECTION)
...
@@ -63,7 +63,6 @@ if (HB_HAVE_INTROSPECTION)
set
(
HB_HAVE_GLIB ON
)
set
(
HB_HAVE_GLIB ON
)
endif
()
endif
()
option
(
HB_DISABLE_TEST_PROGS OFF
"Do not build some of the test programs, useful for continuous builds"
)
option
(
HB_CHECK OFF
"Do a configuration suitable for testing (shared library and enable all options)"
)
option
(
HB_CHECK OFF
"Do a configuration suitable for testing (shared library and enable all options)"
)
if
(
HB_CHECK
)
if
(
HB_CHECK
)
set
(
BUILD_SHARED_LIBS ON
)
set
(
BUILD_SHARED_LIBS ON
)
...
@@ -133,12 +132,11 @@ endif ()
...
@@ -133,12 +132,11 @@ endif ()
## Detect if we are running inside a distribution or regular repository folder
## Detect if we are running inside a distribution or regular repository folder
set
(
IN_HB_DIST FALSE
)
# if (EXISTS "${PROJECT_SOURCE_DIR}/ChangeLog")
if
(
EXISTS
"
${
PROJECT_SOURCE_DIR
}
/ChangeLog"
)
# # perhaps we are on dist directory
# perhaps we are on dist directory
# set (IN_HB_DIST TRUE)
set
(
IN_HB_DIST TRUE
)
# #set (HB_VERSION_H "${PROJECT_SOURCE_DIR}/src/hb-version.h")
#set (HB_VERSION_H "${PROJECT_SOURCE_DIR}/src/hb-version.h")
# endif ()
endif
()
## Extract variables from Makefile files
## Extract variables from Makefile files
...
@@ -210,31 +208,23 @@ set (HB_VERSION_MICRO ${CMAKE_MATCH_4})
...
@@ -210,31 +208,23 @@ set (HB_VERSION_MICRO ${CMAKE_MATCH_4})
## Define ragel tasks
## Define ragel tasks
if
(
NOT IN_HB_DIST
)
# if (NOT IN_HB_DIST)
find_program
(
RAGEL
"ragel"
CMAKE_FIND_ROOT_PATH_BOTH
)
# foreach (ragel_output IN ITEMS ${HB_BASE_RAGEL_GENERATED_sources} ${HB_OT_RAGEL_GENERATED_sources})
# string(REGEX MATCH "([^/]+)\\.hh" temp ${ragel_output})
if
(
RAGEL
)
# set (target_name ${CMAKE_MATCH_1})
message
(
STATUS
"ragel found at:
${
RAGEL
}
"
)
# add_custom_command(OUTPUT ${ragel_output}
else
()
# COMMAND ${RAGEL} -G2 -o ${ragel_output} ${PROJECT_SOURCE_DIR}/src/${target_name}.rl -I ${PROJECT_SOURCE_DIR} ${ARGN}
message
(
FATAL_ERROR
"ragel not found, get it here -- http://www.complang.org/ragel/ or, use harfbuzz releases https://github.com/harfbuzz/harfbuzz/releases"
)
# DEPENDS ${PROJECT_SOURCE_DIR}/src/${target_name}.rl
endif
()
# )
# add_custom_target(harfbuzz_${target_name} DEPENDS ${PROJECT_BINARY_DIR}/src/${target_name})
foreach
(
ragel_output IN ITEMS
${
HB_BASE_RAGEL_GENERATED_sources
}
${
HB_OT_RAGEL_GENERATED_sources
}
)
# endforeach ()
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_
${
target_name
}
DEPENDS
${
PROJECT_BINARY_DIR
}
/src/
${
target_name
}
)
endforeach
()
mark_as_advanced
(
RAGEL
)
#
mark_as_advanced(RAGEL)
endif
()
#
endif ()
## Generate hb-version.h
## Generate hb-version.h
#if (NOT IN_HB_DIST)
#
if (NOT IN_HB_DIST)
# set (HB_VERSION_H_IN "${PROJECT_SOURCE_DIR}/src/hb-version.h.in")
# set (HB_VERSION_H_IN "${PROJECT_SOURCE_DIR}/src/hb-version.h.in")
# set (HB_VERSION_H "${PROJECT_BINARY_DIR}/src/hb-version.h")
# set (HB_VERSION_H "${PROJECT_BINARY_DIR}/src/hb-version.h")
# set_source_files_properties("${HB_VERSION_H}" PROPERTIES GENERATED true)
# set_source_files_properties("${HB_VERSION_H}" PROPERTIES GENERATED true)
...
@@ -244,7 +234,7 @@ endif ()
...
@@ -244,7 +234,7 @@ endif ()
# "${HB_VERSION_H}"
# "${HB_VERSION_H}"
# )
# )
# file(REMOVE "${HB_VERSION_H}.tmp")
# file(REMOVE "${HB_VERSION_H}.tmp")
#endif ()
#
endif ()
## Define sources and headers of the project
## Define sources and headers of the project
...
@@ -808,8 +798,7 @@ endif ()
...
@@ -808,8 +798,7 @@ endif ()
## src/ executables
## src/ executables
if
(
NOT HB_DISABLE_TEST_PROGS
)
foreach
(
prog main test test-would-substitute test-size-params test-buffer-serialize hb-ot-tag test-unicode-ranges
)
foreach
(
prog main test test-would-substitute test-size-params test-buffer-serialize hb-ot-tag test-unicode-ranges
)
set
(
prog_name
${
prog
}
)
set
(
prog_name
${
prog
}
)
if
(
${
prog_name
}
STREQUAL
"test"
)
if
(
${
prog_name
}
STREQUAL
"test"
)
# test can not be used as a valid executable name on cmake, lets special case it
# test can not be used as a valid executable name on cmake, lets special case it
...
@@ -817,9 +806,8 @@ if (NOT HB_DISABLE_TEST_PROGS)
...
@@ -817,9 +806,8 @@ if (NOT HB_DISABLE_TEST_PROGS)
endif
()
endif
()
add_executable
(
${
prog_name
}
${
PROJECT_SOURCE_DIR
}
/src/
${
prog
}
.cc
)
add_executable
(
${
prog_name
}
${
PROJECT_SOURCE_DIR
}
/src/
${
prog
}
.cc
)
target_link_libraries
(
${
prog_name
}
harfbuzz
${
THIRD_PARTY_LIBS
}
)
target_link_libraries
(
${
prog_name
}
harfbuzz
${
THIRD_PARTY_LIBS
}
)
endforeach
()
endforeach
()
set_target_properties
(
hb-ot-tag PROPERTIES COMPILE_FLAGS
"-DMAIN"
)
set_target_properties
(
hb-ot-tag PROPERTIES COMPILE_FLAGS
"-DMAIN"
)
endif
()
## Tests
## Tests
if
(
UNIX OR MINGW
)
if
(
UNIX OR MINGW
)
...
...
test/api/CMakeLists.txt
浏览文件 @
0eec3315
if
(
HB_HAVE_GLIB
AND NOT HB_DISABLE_TEST_PROGS
)
if
(
HB_HAVE_GLIB
)
file
(
READ
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/Makefile.am"
MAKEFILEAM
)
file
(
READ
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/Makefile.am"
MAKEFILEAM
)
extract_make_variable
(
TEST_PROGS
${
MAKEFILEAM
}
)
extract_make_variable
(
TEST_PROGS
${
MAKEFILEAM
}
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录