mirror of
https://github.com/openharmony/third_party_libjpeg-turbo.git
synced 2026-07-01 06:47:48 -04:00
@@ -17,29 +17,9 @@ if (defined(ohos_lite)) {
|
||||
import("//build/ohos.gni")
|
||||
}
|
||||
|
||||
config("turbojpeg_opt") {
|
||||
if (target_platform == "pc") {
|
||||
if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64")) {
|
||||
defines = [ "HUFF_DECODE_OPT" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config("turbojpeg_local_symbol_first") {
|
||||
if (target_platform == "pc") {
|
||||
if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64")) {
|
||||
ldflags = [ "-Wl,-Bsymbolic" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config("turbojpeg_hide_symbol") {
|
||||
if (target_platform == "pc") {
|
||||
if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64")) {
|
||||
cflags = [ "-fvisibility=hidden" ]
|
||||
defines = [ "HIDE_INTERNAL" ]
|
||||
}
|
||||
}
|
||||
declare_args() {
|
||||
is_arm_ohos_clang_pc = (target_cpu == "arm" || target_cpu == "arm64") &&
|
||||
is_ohos && is_clang && target_platform == "pc"
|
||||
}
|
||||
|
||||
action("libjpeg_action") {
|
||||
@@ -94,7 +74,7 @@ action("libjpeg_action") {
|
||||
"${target_gen_dir}/libjpeg-turbo-2.1.1/jutils.c",
|
||||
]
|
||||
|
||||
if (target_platform == "pc") {
|
||||
if (is_arm_ohos_clang_pc) {
|
||||
outputs += [ "${target_gen_dir}/libjpeg-turbo-2.1.1/jdhuff_opt.c" ]
|
||||
} else {
|
||||
outputs += [ "${target_gen_dir}/libjpeg-turbo-2.1.1/jdhuff.c" ]
|
||||
@@ -233,24 +213,27 @@ if (defined(ohos_lite)) {
|
||||
ohos_static_library("turbojpeg_static") {
|
||||
sources = get_target_outputs(":libjpeg_action")
|
||||
public_configs = [ ":turbojpeg_config" ]
|
||||
configs = [
|
||||
":turbojpeg_opt",
|
||||
":turbojpeg_hide_symbol",
|
||||
]
|
||||
deps = [ ":libjpeg_action" ]
|
||||
part_name = "libjpeg-turbo"
|
||||
subsystem_name = "thirdparty"
|
||||
if (is_arm_ohos_clang_pc) {
|
||||
defines = [ "HUFF_DECODE_OPT" ]
|
||||
cflags += [ "-fvisibility=hidden" ]
|
||||
}
|
||||
}
|
||||
ohos_shared_library("turbojpeg") {
|
||||
sources = get_target_outputs(":libjpeg_action")
|
||||
public_configs = [ ":turbojpeg_config" ]
|
||||
configs = [
|
||||
":turbojpeg_opt",
|
||||
":turbojpeg_local_symbol_first",
|
||||
]
|
||||
deps = [ ":libjpeg_action" ]
|
||||
innerapi_tags = [ "platformsdk" ]
|
||||
part_name = "libjpeg-turbo"
|
||||
subsystem_name = "thirdparty"
|
||||
if (is_arm_ohos_clang_pc) {
|
||||
defines = [
|
||||
"HUFF_DECODE_OPT",
|
||||
"HIDE_INTERNAL",
|
||||
]
|
||||
ldflags = [ "-Wl,-Bsymbolic" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user