From e27f2b9d67a1522178ffa9a643a79e2fab4bd7e7 Mon Sep 17 00:00:00 2001 From: songhao Date: Thu, 14 Apr 2022 10:47:33 +0800 Subject: [PATCH] =?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 | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/ts2panda/ts2abc/BUILD.gn b/ts2panda/ts2abc/BUILD.gn index 67fa13c882..daa0c2853d 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,37 @@ 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" ] +} + +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" ] + use_exceptions = true subsystem_name = "ark" part_name = "ark_frontend_tool" } -- Gitee