# Copyright (c) 2022 Unionman Technology Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//build/ohos/ndk/ndk.gni") config("mesa3d-common_config") { } ohos_prebuilt_shared_library("libgbm.so.1") { if (target_cpu == "arm") { source = "lib/libgbm.so.1" } else if (target_cpu == "arm64") { source = "lib64/libgbm.so.1" } install_images = [ chipset_base_dir ] relative_install_dir = "chipsetsdk" part_name = "device_unionpi_tiger" install_enable = true public_configs = [ ":mesa3d-common_config" ] } ohos_prebuilt_shared_library("libEGL.so.1") { if (target_cpu == "arm") { source = "lib/libEGL.so.1" } else if (target_cpu == "arm64") { source = "lib64/libEGL.so.1" } install_images = [ chipset_base_dir ] relative_install_dir = "chipsetsdk" symlink_target_name = [ "libEGL.so", "libEGL_impl.so", ] part_name = "device_unionpi_tiger" install_enable = true public_configs = [ ":mesa3d-common_config" ] } ohos_prebuilt_shared_library("libglapi.so.0") { if (target_cpu == "arm") { source = "lib/libglapi.so.0" } else if (target_cpu == "arm64") { source = "lib64/libglapi.so.0" } install_images = [ chipset_base_dir ] relative_install_dir = "chipsetsdk" part_name = "device_unionpi_tiger" install_enable = true public_configs = [ ":mesa3d-common_config" ] } ohos_prebuilt_shared_library("libGLESv1_CM.so.1") { if (target_cpu == "arm") { source = "lib/libGLESv1_CM.so.1" } else if (target_cpu == "arm64") { source = "lib64/libGLESv1_CM.so.1" } install_images = [ chipset_base_dir ] relative_install_dir = "chipsetsdk" symlink_target_name = [ "libGLESv1.so", "libGLESv1_impl.so", ] part_name = "device_unionpi_tiger" install_enable = true public_configs = [ ":mesa3d-common_config" ] } ohos_prebuilt_shared_library("libGLESv2.so.2") { if (target_cpu == "arm") { source = "lib/libGLESv2.so.2" } else if (target_cpu == "arm64") { source = "lib64/libGLESv2.so.2" } install_images = [ chipset_base_dir ] relative_install_dir = "chipsetsdk" symlink_target_name = [ "libGLESv2.so", "libGLESv2_impl.so", "libGLESv3.so", "libGLESv3_impl.so", ] part_name = "device_unionpi_tiger" install_enable = true public_configs = [ ":mesa3d-common_config" ] } group("mesa3d-panforst-ohos") { deps = [ ":libEGL.so.1", ":libGLESv1_CM.so.1", ":libGLESv2.so.2", ":libgbm.so.1", ":libglapi.so.0", ] } ohos_prebuilt_shared_library("libgallium_dri.so") { if (target_cpu == "arm") { source = "lib/libgallium_dri.so" } else if (target_cpu == "arm64") { source = "lib64/libgallium_dri.so" } install_enable = true install_images = [ chipset_base_dir ] relative_install_dir = "chipsetsdk" symlink_target_name = [ "panfrost_dri.so", "meson_dri.so", ] part_name = "device_unionpi_tiger" } ohos_prebuilt_etc("gpu-sched.ko") { source = "modules/gpu-sched.ko" module_install_dir = "modules" install_images = [ chipset_base_dir ] part_name = "device_unionpi_tiger" } ohos_prebuilt_etc("panfrost.ko") { source = "modules/panfrost.ko" module_install_dir = "modules" install_images = [ chipset_base_dir ] part_name = "device_unionpi_tiger" } group("gpu") { deps = [ ":gpu-sched.ko", ":libgallium_dri.so", ":mesa3d-panforst-ohos", ":panfrost.ko", ] }