diff --git a/ts2panda/BUILD.gn b/ts2panda/BUILD.gn index 815bcb1def6f07baca8e3dd1e441d8fbd364e5ce..1424e00fcd110f0a11150b0a3640173a219eff2f 100755 --- a/ts2panda/BUILD.gn +++ b/ts2panda/BUILD.gn @@ -17,12 +17,24 @@ import("//build/config/clang/clang.gni") import("//build/ohos.gni") src_dir = target_out_dir + "/src" +src_dir_full_path = rebase_path("${ts2abc_root}/src") +arguments = [ "-c" ] +arguments += [ "ls ${src_dir_full_path} " ] +src_files = exec_script("/bin/sh", arguments, "list lines") + +foreach(file, src_files) { + ohos_copy("ts2abc_src_${file}") { + sources = [ "${ts2abc_root}/src/${file}" ] + outputs = [ "${src_dir}/${file}" ] + module_install_name = "" + } +} -ohos_copy("ts2abc_src") { - sources = [ "${ts2abc_root}/src" ] - - outputs = [ src_dir ] - module_install_name = "" +group("ts2abc_src") { + deps = [] + foreach(file, src_files) { + deps += [ ":ts2abc_src_${file}" ] + } } ohos_copy("node_modules") {