From 761e00bc108081a5ef0e2fa1994bcded1c88c197 Mon Sep 17 00:00:00 2001 From: songhao Date: Tue, 12 Apr 2022 16:18:01 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=8F=90source=5Fset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: songhao --- ts2panda/ts2abc/BUILD.gn | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/ts2panda/ts2abc/BUILD.gn b/ts2panda/ts2abc/BUILD.gn index 67fa13c882..6a5d727d50 100755 --- a/ts2panda/ts2abc/BUILD.gn +++ b/ts2panda/ts2abc/BUILD.gn @@ -45,13 +45,13 @@ config("ts2abc_config") { } } -ohos_executable("ts2abc") { +source_set("ts2abc_static") { sources = [ "main.cpp", "ts2abc.cpp", ] - configs = [ ":ts2abc_config" ] + public_configs = [ ":ts2abc_config" ] cflags = [ "-Wno-c++20-designator", @@ -98,24 +98,43 @@ ohos_executable("ts2abc") { libs = [ libcpp_static_lib ] } } +} + +ohos_executable("ts2abc") { + deps = [ ":ts2abc_static" ] output_name = "js2abc" install_enable = true subsystem_name = "ark" } -ohos_static_library("jsoncpp_static") { +config("flag_config") { + cflags_cc = [ "-fexceptions" ] +} + +group("jsoncpp_tar") { + # Config to apply to all targets that depend on this one. + public_configs = [ ":flag_config" ] +} + +source_set("jsoncpp_set_static") { sources = [ "//third_party/jsoncpp/src/lib_json/json_reader.cpp", "//third_party/jsoncpp/src/lib_json/json_value.cpp", "//third_party/jsoncpp/src/lib_json/json_writer.cpp", ] - use_exceptions = true - configs = [ "$jsoncpp_root:jsoncpp_config" ] + public_configs = [ "$jsoncpp_root:jsoncpp_config" ] + public_configs += [ ":flag_config" ] include_dirs = [ "$jsoncpp_root/include", "$jsoncpp_root/include/json/", ] +} + +ohos_static_library("jsoncpp_static") { + deps = [ ":jsoncpp_set_static" ] + public_deps = [ ":jsoncpp_tar" ] + use_exceptions = true subsystem_name = "ark" part_name = "ark_frontend_tool" } -- Gitee From ad9d63ace8af9f47fd735c97ea974eadef70ca4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E5=AE=8F=E6=98=8A?= Date: Thu, 14 Apr 2022 02:03:07 +0000 Subject: [PATCH 2/4] =?UTF-8?q?update=20ts2panda/ts2abc/BUILD.gn.=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ts2panda/ts2abc/BUILD.gn | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ts2panda/ts2abc/BUILD.gn b/ts2panda/ts2abc/BUILD.gn index 6a5d727d50..f488e558e7 100755 --- a/ts2panda/ts2abc/BUILD.gn +++ b/ts2panda/ts2abc/BUILD.gn @@ -112,11 +112,6 @@ config("flag_config") { cflags_cc = [ "-fexceptions" ] } -group("jsoncpp_tar") { - # Config to apply to all targets that depend on this one. - public_configs = [ ":flag_config" ] -} - source_set("jsoncpp_set_static") { sources = [ "//third_party/jsoncpp/src/lib_json/json_reader.cpp", @@ -124,7 +119,6 @@ source_set("jsoncpp_set_static") { "//third_party/jsoncpp/src/lib_json/json_writer.cpp", ] public_configs = [ "$jsoncpp_root:jsoncpp_config" ] - public_configs += [ ":flag_config" ] include_dirs = [ "$jsoncpp_root/include", "$jsoncpp_root/include/json/", @@ -133,7 +127,6 @@ source_set("jsoncpp_set_static") { ohos_static_library("jsoncpp_static") { deps = [ ":jsoncpp_set_static" ] - public_deps = [ ":jsoncpp_tar" ] use_exceptions = true subsystem_name = "ark" part_name = "ark_frontend_tool" -- Gitee From 6a557218214e947dcb0741f32490f17215727feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E5=AE=8F=E6=98=8A?= Date: Thu, 14 Apr 2022 02:10:11 +0000 Subject: [PATCH 3/4] update ts2panda/ts2abc/BUILD.gn. --- ts2panda/ts2abc/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/ts2panda/ts2abc/BUILD.gn b/ts2panda/ts2abc/BUILD.gn index f488e558e7..daa0c2853d 100755 --- a/ts2panda/ts2abc/BUILD.gn +++ b/ts2panda/ts2abc/BUILD.gn @@ -119,6 +119,7 @@ source_set("jsoncpp_set_static") { "//third_party/jsoncpp/src/lib_json/json_writer.cpp", ] public_configs = [ "$jsoncpp_root:jsoncpp_config" ] + public_configs += [ ":flag_config" ] include_dirs = [ "$jsoncpp_root/include", "$jsoncpp_root/include/json/", -- Gitee From 7255420f99ba68ff77784c0ed326c9eaee52b42b Mon Sep 17 00:00:00 2001 From: songhao Date: Thu, 14 Apr 2022 10:23:15 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BC=98=E5=8C=96config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: songhao --- ts2panda/ts2abc/BUILD.gn | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ts2panda/ts2abc/BUILD.gn b/ts2panda/ts2abc/BUILD.gn index 6a5d727d50..daa0c2853d 100755 --- a/ts2panda/ts2abc/BUILD.gn +++ b/ts2panda/ts2abc/BUILD.gn @@ -112,11 +112,6 @@ config("flag_config") { cflags_cc = [ "-fexceptions" ] } -group("jsoncpp_tar") { - # Config to apply to all targets that depend on this one. - public_configs = [ ":flag_config" ] -} - source_set("jsoncpp_set_static") { sources = [ "//third_party/jsoncpp/src/lib_json/json_reader.cpp", @@ -133,7 +128,6 @@ source_set("jsoncpp_set_static") { ohos_static_library("jsoncpp_static") { deps = [ ":jsoncpp_set_static" ] - public_deps = [ ":jsoncpp_tar" ] use_exceptions = true subsystem_name = "ark" part_name = "ark_frontend_tool" -- Gitee