Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
bf50ddaf
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bf50ddaf
编写于
5月 04, 2017
作者:
E
Ebrahim Byagowi
提交者:
GitHub
5月 04, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[cmake] minor (#482)
上级
141b33de
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
11 deletion
+19
-11
CMakeLists.txt
CMakeLists.txt
+19
-11
未找到文件。
CMakeLists.txt
浏览文件 @
bf50ddaf
cmake_minimum_required
(
VERSION 2.8.0
)
project
(
harfbuzz
)
## Disallow in-source builds
if
(
"
${
PROJECT_BINARY_DIR
}
"
STREQUAL
"
${
PROJECT_SOURCE_DIR
}
"
)
## Disallow in-source builds
, as CMake generated make files can collide with autotools ones
if
(
NOT MSVC AND
"
${
PROJECT_BINARY_DIR
}
"
STREQUAL
"
${
PROJECT_SOURCE_DIR
}
"
)
message
(
FATAL_ERROR
"
In-source builds are not permitted! Make a separate folder for"
...
...
@@ -14,7 +14,7 @@ Before that, remove the files created by this failed run with"
"
rm -rf CMakeCache.txt CMakeFiles"
)
endif
()
##
## HarfBuzz build configurations
option
(
HB_HAVE_FREETYPE
"Enable freetype interop helpers"
OFF
)
...
...
@@ -53,8 +53,9 @@ endif ()
if
(
WIN32 AND NOT MINGW AND BUILD_SHARED_LIBS
)
add_definitions
(
"-DHB_EXTERN=__declspec(dllexport) extern"
)
endif
()
##
## Detect if cmake is in distribution or regular repository folder
set
(
IN_HB_DIST FALSE
)
if
(
EXISTS
"
${
PROJECT_SOURCE_DIR
}
/src/hb-version.h"
)
# perhaps we are on dist directory
...
...
@@ -62,6 +63,7 @@ if (EXISTS "${PROJECT_SOURCE_DIR}/src/hb-version.h")
set
(
HB_VERSION_H
"
${
PROJECT_SOURCE_DIR
}
/src/hb-version.h"
)
endif
()
## Extract variables from Makefile files
# http://stackoverflow.com/a/27630120/1414809
function
(
prepend var prefix
)
...
...
@@ -108,7 +110,7 @@ set(HB_VERSION ${CMAKE_MATCH_1})
set
(
HB_VERSION_MAJOR
${
CMAKE_MATCH_2
}
)
set
(
HB_VERSION_MINOR
${
CMAKE_MATCH_3
}
)
set
(
HB_VERSION_MICRO
${
CMAKE_MATCH_4
}
)
##
if
(
NOT IN_HB_DIST
)
## Define ragel tasks
...
...
@@ -131,7 +133,7 @@ if (NOT IN_HB_DIST)
endforeach
()
mark_as_advanced
(
RAGEL
)
##
## Generate hb-version.h
set
(
HB_VERSION_H_IN
"
${
PROJECT_SOURCE_DIR
}
/src/hb-version.h.in"
)
...
...
@@ -142,7 +144,8 @@ if (NOT IN_HB_DIST)
"
${
HB_VERSION_H
}
.tmp"
"
${
HB_VERSION_H
}
"
)
file
(
REMOVE
"
${
HB_VERSION_H
}
.tmp"
)
##
endif
()
## Define sources and headers of the project
...
...
@@ -161,6 +164,8 @@ set(project_headers
${
HB_OT_headers
}
)
## Find and include needed header folders and libraries
if
(
HB_HAVE_FREETYPE
)
add_definitions
(
-DHAVE_FREETYPE=1 -DHAVE_FT_FACE_GETCHARVARIANTINDEX=1
)
...
...
@@ -285,7 +290,7 @@ if (WIN32 AND HB_HAVE_DIRECTWRITE)
list
(
APPEND THIRD_PARTY_LIBS dwrite rpcrt4
)
endif
()
##
## Atomic ops availability detection
file
(
WRITE
"
${
PROJECT_BINARY_DIR
}
/try_compile_intel_atomic_primitives.c"
...
...
@@ -317,11 +322,14 @@ try_compile(HB_HAVE_SOLARIS_ATOMIC_OPS
if
(
HB_HAVE_SOLARIS_ATOMIC_OPS
)
add_definitions
(
-DHAVE_SOLARIS_ATOMIC_OPS
)
endif
()
##
## Define harfbuzz library
add_library
(
harfbuzz
${
project_sources
}
${
project_headers
}
)
target_link_libraries
(
harfbuzz
${
THIRD_PARTY_LIBS
}
)
## Additional harfbuzz build artifacts
if
(
HB_BUILD_UTILS
)
# https://github.com/WebKit/webkit/blob/master/Source/cmake/FindCairo.cmake
find_package
(
PkgConfig
)
...
...
@@ -343,9 +351,10 @@ if (HB_BUILD_UTILS)
add_executable
(
hb-ot-shape-closure
${
HB_OT_SHAPE_CLOSURE_sources
}
)
target_link_libraries
(
hb-ot-shape-closure harfbuzz
)
mark_as_advanced
(
CAIRO_LIBRARIESNAMES
)
mark_as_advanced
(
CAIRO_
INCLUDE_DIRS CAIRO_
LIBRARIESNAMES
)
endif
()
## Install
if
(
NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL
)
install
(
FILES
${
project_headers
}
DESTINATION include/harfbuzz
)
...
...
@@ -358,4 +367,3 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
RUNTIME DESTINATION bin
)
endif
()
##
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录