提交 415ff26d 编写于 作者: C Colin Cross

Convert frameworks/minikin to Android.bp

See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: I71d3406054b35dd4e8ae30f46eec6cef77eef160
Merged-In: I71d3406054b35dd4e8ae30f46eec6cef77eef160
上级 d9110339
cc_library_headers {
name: "libminikin_headers",
host_supported: true,
export_include_dirs: ["include"],
}
subdirs = [
"app",
"libs/minikin",
"sample",
]
// Copyright (C) 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// see how_to_run.txt for instructions on running these tests
cc_binary_host {
name: "hyphtool",
static_libs: ["libminikin"],
// Shared libraries which are dependencies of minikin; these are not automatically
// pulled in by the build system (and thus sadly must be repeated).
shared_libs: [
"liblog",
"libicuuc",
],
srcs: ["HyphTool.cpp"],
}
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# see how_to_run.txt for instructions on running these tests
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := hyphtool
LOCAL_MODULE_TAGS := optional
LOCAL_STATIC_LIBRARIES := libminikin_host
# Shared libraries which are dependencies of minikin; these are not automatically
# pulled in by the build system (and thus sadly must be repeated).
LOCAL_SHARED_LIBRARIES := \
liblog \
libicuuc
LOCAL_SRC_FILES += \
HyphTool.cpp
include $(BUILD_HOST_EXECUTABLE)
// Copyright (C) 2013 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Generate unicode emoji data from UCD.
genrule {
name: "gen-emoji-header",
cmd: "python $(location unicode_emoji_h_gen.py) -i $(in) -o $(out)",
srcs: ["emoji-data.txt"],
out: ["generated/UnicodeData.h"],
tool_files: ["unicode_emoji_h_gen.py"],
}
cc_library {
name: "libminikin",
host_supported: true,
srcs: [
"Hyphenator.cpp",
],
target: {
android: {
srcs: [
"AnalyzeStyle.cpp",
"CmapCoverage.cpp",
"FontCollection.cpp",
"FontFamily.cpp",
"FontLanguage.cpp",
"FontLanguageListCache.cpp",
"GraphemeBreak.cpp",
"HbFontCache.cpp",
"Layout.cpp",
"LayoutUtils.cpp",
"LineBreaker.cpp",
"Measurement.cpp",
"MinikinInternal.cpp",
"MinikinRefCounted.cpp",
"MinikinFont.cpp",
"MinikinFontFreeType.cpp",
"SparseBitSet.cpp",
"WordBreaker.cpp",
],
shared_libs: [
"libharfbuzz_ng",
"libft2",
"libz",
"libutils",
],
// TODO: clean up Minikin so it doesn't need the freetype include
export_shared_lib_headers: ["libft2"],
},
},
generated_headers: ["gen-emoji-header"],
cppflags: [
"-Werror",
"-Wall",
"-Wextra",
],
product_variables: {
debuggable: {
// Enable race detection on eng and userdebug build.
cppflags: ["-DENABLE_RACE_DETECTION"],
},
},
shared_libs: [
"liblog",
"libicuuc",
],
header_libs: ["libminikin_headers"],
export_header_lib_headers: ["libminikin_headers"],
clang: true,
sanitize: {
misc_undefined: [
"signed-integer-overflow",
// b/26432628.
//"unsigned-integer-overflow",
],
},
}
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# Generate unicode emoji data from UCD.
UNICODE_EMOJI_H_GEN_PY := $(LOCAL_PATH)/unicode_emoji_h_gen.py
UNICODE_EMOJI_DATA := $(TOP)/external/unicode/emoji-data.txt
UNICODE_EMOJI_H := $(intermediates)/generated/UnicodeData.h
$(UNICODE_EMOJI_H): $(UNICODE_EMOJI_H_GEN_PY) $(UNICODE_EMOJI_DATA)
$(LOCAL_PATH)/MinikinInternal.cpp: $(UNICODE_EMOJI_H)
$(UNICODE_EMOJI_H): PRIVATE_CUSTOM_TOOL := python $(UNICODE_EMOJI_H_GEN_PY) \
-i $(UNICODE_EMOJI_DATA) \
-o $(UNICODE_EMOJI_H)
$(UNICODE_EMOJI_H):
$(transform-generated-source)
include $(CLEAR_VARS)
minikin_src_files := \
AnalyzeStyle.cpp \
CmapCoverage.cpp \
FontCollection.cpp \
FontFamily.cpp \
FontLanguage.cpp \
FontLanguageListCache.cpp \
GraphemeBreak.cpp \
HbFontCache.cpp \
Hyphenator.cpp \
Layout.cpp \
LayoutUtils.cpp \
LineBreaker.cpp \
Measurement.cpp \
MinikinInternal.cpp \
MinikinRefCounted.cpp \
MinikinFont.cpp \
MinikinFontFreeType.cpp \
SparseBitSet.cpp \
WordBreaker.cpp
minikin_c_includes := \
external/harfbuzz_ng/src \
external/freetype/include \
frameworks/minikin/include \
$(intermediates)
minikin_shared_libraries := \
libharfbuzz_ng \
libft2 \
liblog \
libz \
libicuuc \
libutils
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
# Enable race detection on eng and userdebug build.
enable_race_detection := -DENABLE_RACE_DETECTION
else
enable_race_detection :=
endif
LOCAL_MODULE := libminikin
LOCAL_EXPORT_C_INCLUDE_DIRS := frameworks/minikin/include
LOCAL_SRC_FILES := $(minikin_src_files)
LOCAL_C_INCLUDES := $(minikin_c_includes)
LOCAL_CPPFLAGS += -Werror -Wall -Wextra $(enable_race_detection)
LOCAL_SHARED_LIBRARIES := $(minikin_shared_libraries)
LOCAL_CLANG := true
LOCAL_SANITIZE := signed-integer-overflow
# b/26432628.
#LOCAL_SANITIZE += unsigned-integer-overflow
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libminikin
LOCAL_MODULE_TAGS := optional
LOCAL_EXPORT_C_INCLUDE_DIRS := frameworks/minikin/include
LOCAL_SRC_FILES := $(minikin_src_files)
LOCAL_C_INCLUDES := $(minikin_c_includes)
LOCAL_CPPFLAGS += -Werror -Wall -Wextra $(enable_race_detection)
LOCAL_SHARED_LIBRARIES := $(minikin_shared_libraries)
LOCAL_CLANG := true
LOCAL_SANITIZE := signed-integer-overflow
# b/26432628.
#LOCAL_SANITIZE += unsigned-integer-overflow
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Reduced library (currently just hyphenation) for host
LOCAL_MODULE := libminikin_host
LOCAL_MODULE_TAGS := optional
LOCAL_EXPORT_C_INCLUDE_DIRS := frameworks/minikin/include
LOCAL_C_INCLUDES := $(minikin_c_includes)
LOCAL_CPPFLAGS += -Werror -Wall -Wextra $(enable_race_detection)
LOCAL_SHARED_LIBRARIES := liblog libicuuc
LOCAL_SRC_FILES := Hyphenator.cpp
include $(BUILD_HOST_STATIC_LIBRARY)
../../../../external/unicode/emoji-data.txt
\ No newline at end of file
// Copyright (C) 2013 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_test {
name: "minikin_example",
gtest: false,
srcs: ["example.cpp"],
shared_libs: [
"libutils",
"liblog",
"libcutils",
"libharfbuzz_ng",
"libicuuc",
"libft2",
"libpng",
"libz",
"libminikin",
],
}
cc_test {
name: "minikin_skia_example",
gtest: false,
srcs: [
"example_skia.cpp",
"MinikinSkia.cpp",
],
shared_libs: [
"libutils",
"liblog",
"libcutils",
"libharfbuzz_ng",
"libicuuc",
"libskia",
"libminikin",
"libft2",
],
}
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_C_INCLUDES += \
external/harfbuzz_ng/src \
external/freetype/include \
frameworks/minikin/include
LOCAL_SRC_FILES:= example.cpp
LOCAL_SHARED_LIBRARIES += \
libutils \
liblog \
libcutils \
libharfbuzz_ng \
libicuuc \
libft2 \
libpng \
libz \
libminikin
LOCAL_MODULE:= minikin_example
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE_TAG := tests
LOCAL_C_INCLUDES += \
external/harfbuzz_ng/src \
external/freetype/include \
frameworks/minikin/include \
external/skia/src/core
LOCAL_SRC_FILES:= example_skia.cpp \
MinikinSkia.cpp
LOCAL_SHARED_LIBRARIES += \
libutils \
liblog \
libcutils \
libharfbuzz_ng \
libicuuc \
libskia \
libminikin \
libft2
LOCAL_MODULE:= minikin_skia_example
include $(BUILD_EXECUTABLE)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册