1# Copyright (c) 2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15 16config("astc_encoder_config") { 17 include_dirs = [ "//third_party/astc-encoder/Source" ] 18} 19 20ohos_source_set("astc_encoder_static") { 21 public_configs = [ ":astc_encoder_config" ] 22 sources = [ 23 "//third_party/astc-encoder/Source/astcenc_averages_and_directions.cpp", 24 "//third_party/astc-encoder/Source/astcenc_block_sizes.cpp", 25 "//third_party/astc-encoder/Source/astcenc_color_quantize.cpp", 26 "//third_party/astc-encoder/Source/astcenc_color_unquantize.cpp", 27 "//third_party/astc-encoder/Source/astcenc_compress_symbolic.cpp", 28 "//third_party/astc-encoder/Source/astcenc_compute_variance.cpp", 29 "//third_party/astc-encoder/Source/astcenc_decompress_symbolic.cpp", 30 "//third_party/astc-encoder/Source/astcenc_diagnostic_trace.cpp", 31 "//third_party/astc-encoder/Source/astcenc_entry.cpp", 32 "//third_party/astc-encoder/Source/astcenc_find_best_partitioning.cpp", 33 "//third_party/astc-encoder/Source/astcenc_ideal_endpoints_and_weights.cpp", 34 "//third_party/astc-encoder/Source/astcenc_image.cpp", 35 "//third_party/astc-encoder/Source/astcenc_integer_sequence.cpp", 36 "//third_party/astc-encoder/Source/astcenc_mathlib.cpp", 37 "//third_party/astc-encoder/Source/astcenc_mathlib_softfloat.cpp", 38 "//third_party/astc-encoder/Source/astcenc_partition_tables.cpp", 39 "//third_party/astc-encoder/Source/astcenc_percentile_tables.cpp", 40 "//third_party/astc-encoder/Source/astcenc_pick_best_endpoint_format.cpp", 41 "//third_party/astc-encoder/Source/astcenc_quantization.cpp", 42 "//third_party/astc-encoder/Source/astcenc_symbolic_physical.cpp", 43 "//third_party/astc-encoder/Source/astcenc_weight_align.cpp", 44 "//third_party/astc-encoder/Source/astcenc_weight_quant_xfer_tables.cpp", 45 ] 46 if (defined(global_parts_info) && 47 (defined(global_parts_info.graphic_graphic_2d_ext) || 48 defined(global_parts_info.product_hmos_sdk_product_hmos_sdk))) { 49 defines = [ "ASTC_CUSTOMIZED_ENABLE" ] 50 } 51 if (defined(global_parts_info) && 52 defined(global_parts_info.product_hmos_sdk_product_hmos_sdk)) { 53 defines += [ "BUILD_HMOS_SDK" ] 54 } 55 part_name = "astc-encoder" 56 subsystem_name = "thirdparty" 57} 58 59ohos_shared_library("astc_encoder_shared") { 60 public_configs = [ ":astc_encoder_config" ] 61 deps = [ ":astc_encoder_static" ] 62 install_enable = true 63 part_name = "astc-encoder" 64 innerapi_tags = [ "platformsdk" ] 65 subsystem_name = "thirdparty" 66 install_images = [ "system" ] 67} 68