diff --git a/BUILD.gn b/BUILD.gn index 2c2705d87cfbd43f408a9674d362f43cb5876025..364f235b1c9b33a34c2d38a0c30337dfff06fa19 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 0c8248e069448adde828e938e495ef3da2249125..4caf60d7211de3dcdbfc37d9c87580ad50eb6aa3 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 (*)();