# Copyright (c) 2023 Huawei Device 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("//foundation/graphic/graphic_2d/graphic_config.gni") ## Build libvulkan_swapchain.so {{{ config("vulkan_config") { defines = [ "VK_USE_PLATFORM_OHOS", "VK_NO_PROTOTYPES", ] cflags = [ "-fvisibility=hidden", "-Wall", "-Werror", "-g3", ] } config("vulkan_public_config") { include_dirs = [ "swapchain", "include", "//third_party/vulkan-loader/loader/generated", "../../frameworks/surface/include", ] } ohos_shared_library("vulkan_swapchain_layer") { sources = [ "swapchain_layer/swapchain_layer.cpp" ] configs = [ ":vulkan_config" ] public_configs = [ ":vulkan_public_config" ] deps = [ "$graphic_2d_root:libsurface", "$graphic_2d_root/utils:sync_fence", "//third_party/vulkan-headers:vulkan_headers", ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] output_name = "vulkan_swapchain" output_extension = "so" part_name = "graphic_2d" subsystem_name = "graphic" } ## Build libvulkan_swapchain.so }}} ## Build VkLayer_swapchain.json {{{ ohos_prebuilt_etc("vulkan_swapchain_layer_json") { source = "swapchain_layer/VkLayer_swapchain.json" part_name = "graphic_2d" subsystem_name = "graphic" module_install_dir = "etc/vulkan/implicit_layer.d" } ## Build VkLayer_swapchain.json }}}