From 3cbe1e8b24d827b114f5af41bc0a5d250329d27c Mon Sep 17 00:00:00 2001 From: zhaonan287 Date: Fri, 7 Feb 2025 10:37:02 +0800 Subject: [PATCH] Fix the path of astcCustomizedSo Signed-off-by: zhaonan287 --- BUILD.gn | 3 +++ Source/astcenc_internal.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index 2c2705d..364f235 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -47,6 +47,9 @@ ohos_source_set("astc_encoder_static") { (defined(global_parts_info.graphic_graphic_2d_ext) || defined(global_parts_info.product_hmos_sdk_product_hmos_sdk))) { defines = [ "ASTC_CUSTOMIZED_ENABLE" ] + if (target_cpu == "arm64" || is_emulator) { + defines += [ "SUT_PATH_X64" ] + } } if (defined(global_parts_info) && defined(global_parts_info.product_hmos_sdk_product_hmos_sdk)) { diff --git a/Source/astcenc_internal.h b/Source/astcenc_internal.h index 0c8248e..4caf60d 100644 --- a/Source/astcenc_internal.h +++ b/Source/astcenc_internal.h @@ -2264,7 +2264,11 @@ const std::string g_astcCustomizedSo = "../../hms/toolchains/lib/libastcCustomiz const std::string g_astcCustomizedSo = "../../hms/toolchains/lib/libastcCustomizedEncode.so"; #endif #else +#ifdef SUT_PATH_X64 const std::string g_astcCustomizedSo = "/system/lib64/module/hms/graphic/libastcCustomizedEncode.z.so"; +#else +const std::string g_astcCustomizedSo = "/system/lib/module/hms/graphic/libastcCustomizedEncode.z.so"; +#endif #endif using IsCustomizedBlockMode = bool (*)(const int); using CustomizedMaxPartitions = int (*)(); -- Gitee