diff --git a/icu4c/BUILD.gn b/icu4c/BUILD.gn index 22caac6a..a4defcbc 100644 --- a/icu4c/BUILD.gn +++ b/icu4c/BUILD.gn @@ -54,15 +54,6 @@ ohos_static_library("static_icustubdata") { subsystem_name = "thirdparty" } -ohos_prebuilt_etc("ohos_icudat") { - source = "$root_out_dir/thirdparty/icu/out/$icu_dat_name.dat" - - deps = [ "//third_party/icu/ohos_icu4c:pkg_icudata" ] - module_install_dir = "usr/ohos_icu/" - part_name = "icu" - subsystem_name = "thirdparty" -} - icu_common_source = [ "//third_party/icu/icu4c/source/common/ubiditransform.cpp", "//third_party/icu/icu4c/source/common/locutil.cpp", @@ -535,10 +526,7 @@ ohos_shared_library("shared_icuuc") { "SYSTEM_TZDATA_DIR=${system_tzdata_dir}", ] sources = icu_common_source - deps = [ - ":ohos_icudat", - ":static_icustubdata", - ] + deps = [ ":static_icustubdata" ] cflags_cc = [ "-O3", "-W", diff --git a/ohos_icu4c/BUILD.gn b/ohos_icu4c/BUILD.gn index 0cd88b0c..07cccefe 100644 --- a/ohos_icu4c/BUILD.gn +++ b/ohos_icu4c/BUILD.gn @@ -29,6 +29,7 @@ ohos_shared_library("icundk") { sources = [ "src/icu_addon.cpp" ] deps = [ + ":ohos_icudat", "//third_party/icu/icu4c:shared_icui18n", "//third_party/icu/icu4c:shared_icuuc", ] @@ -71,3 +72,13 @@ action("pkg_icudata") { ] outputs = [ "$root_out_dir/thirdparty/icu/out/$icu_dat_name.dat" ] } + + +ohos_prebuilt_etc("ohos_icudat") { + source = "$root_out_dir/thirdparty/icu/out/$icu_dat_name.dat" + + deps = [ ":pkg_icudata" ] + module_install_dir = "usr/ohos_icu/" + part_name = "icu" + subsystem_name = "thirdparty" +}