diff --git a/ts2panda/ts2abc/BUILD.gn b/ts2panda/ts2abc/BUILD.gn index 77d34e3a711d64785e6a7d93b5a382e6d295a274..e0e76cadd41c65e661c851e0c96feb122542e485 100755 --- a/ts2panda/ts2abc/BUILD.gn +++ b/ts2panda/ts2abc/BUILD.gn @@ -45,10 +45,10 @@ config("ts2abc_config") { } } -ohos_executable("ts2abc") { +source_set("ts2abc_static"){ sources = [ "ts2abc.cpp" ] - configs = [ ":ts2abc_config" ] + public_configs = [ ":ts2abc_config" ] deps = [ sdk_libc_secshared_dep ] @@ -81,6 +81,10 @@ ohos_executable("ts2abc") { ] } } +} + +ohos_executable("ts2abc") { + deps = [ ":ts2abc_static" ] if (is_linux) { if (build_public_version) { @@ -95,16 +99,25 @@ ohos_executable("ts2abc") { subsystem_name = "ark" } -ohos_static_library("jsoncpp_static") { +config("flag_config") { + cflags_cc = [ "-fexceptions" ] +} + +source_set("jsoncpp_set"){ 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" ] + use_exceptions = true +}