mirror of
https://gitee.com/openharmony/third_party_vulkan-loader
synced 2024-11-23 07:10:23 +00:00
b704218cf0
Signed-off-by: andrew0229 <zhangzhao62@huawei.com> Change-Id: I378fac2b692ad8520d525288c0a8a60ada6e5c0f
112 lines
2.9 KiB
Plaintext
112 lines
2.9 KiB
Plaintext
# 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
|
|
#
|
|
# https://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")
|
|
|
|
# Vulkan loader build options
|
|
|
|
## Build libvulkan.so {{{
|
|
|
|
config("vulkan_internal_config") {
|
|
defines = [
|
|
"VULKAN_NON_CMAKE_BUILD",
|
|
"VK_ENABLE_BETA_EXTENSIONS",
|
|
]
|
|
cflags = [
|
|
"-Wno-conversion",
|
|
"-Wno-extra-semi",
|
|
"-Wno-implicit-fallthrough",
|
|
"-Wno-sign-compare",
|
|
"-Wno-unreachable-code",
|
|
"-Wno-unused-function",
|
|
"-Wno-unused-variable",
|
|
"-fPIC",
|
|
]
|
|
ldflags = [ "-Wl,-Bsymbolic" ]
|
|
|
|
defines += [
|
|
"SYSCONFDIR=\"/system/etc:/system/etc/vulkan/swapchain:/vendor/etc\"",
|
|
"VK_USE_PLATFORM_OHOS",
|
|
]
|
|
}
|
|
|
|
config("vulkan_loader_config") {
|
|
include_dirs = [
|
|
"loader/generated",
|
|
"loader",
|
|
"openharmony",
|
|
]
|
|
defines = [
|
|
"API_NAME=\"Vulkan\"",
|
|
"USE_UNSAFE_FILE_SEARCH=1",
|
|
]
|
|
}
|
|
|
|
ohos_shared_library("vulkan_loader") {
|
|
sources = [
|
|
"loader/adapters.h",
|
|
"loader/allocation.c",
|
|
"loader/allocation.h",
|
|
"loader/cJSON.c",
|
|
"loader/cJSON.h",
|
|
"loader/debug_utils.c",
|
|
"loader/debug_utils.h",
|
|
"loader/dev_ext_trampoline.c",
|
|
"loader/extension_manual.c",
|
|
"loader/extension_manual.h",
|
|
"loader/generated/vk_layer_dispatch_table.h",
|
|
"loader/generated/vk_loader_extensions.h",
|
|
"loader/generated/vk_object_types.h",
|
|
"loader/get_environment.c",
|
|
"loader/get_environment.h",
|
|
"loader/gpa_helper.c",
|
|
"loader/gpa_helper.h",
|
|
"loader/loader.c",
|
|
"loader/loader.h",
|
|
"loader/loader_common.h",
|
|
"loader/log.c",
|
|
"loader/log.h",
|
|
"loader/phys_dev_ext.c",
|
|
"loader/stack_allocation.h",
|
|
"loader/terminator.c",
|
|
"loader/trampoline.c",
|
|
"loader/unknown_function_handling.c",
|
|
"loader/unknown_function_handling.h",
|
|
"loader/vk_loader_layer.h",
|
|
|
|
# TODO(jmadill): Use assembler where available.
|
|
"loader/unknown_ext_chain.c",
|
|
"loader/vk_loader_platform.h",
|
|
"loader/wsi.c",
|
|
"loader/wsi.h",
|
|
]
|
|
|
|
configs = [ ":vulkan_internal_config" ]
|
|
public_configs = [ ":vulkan_loader_config" ]
|
|
external_deps = [
|
|
"hilog:libhilog",
|
|
"init:libbegetutil",
|
|
]
|
|
public_external_deps = [ "vulkan-headers:vulkan_headers" ]
|
|
|
|
innerapi_tags = [ "platformsdk" ]
|
|
output_name = "vulkan"
|
|
output_extension = "so"
|
|
|
|
part_name = "graphic_2d"
|
|
subsystem_name = "graphic"
|
|
|
|
license_file = "//third_party/vulkan-loader/LICENSE.txt"
|
|
}
|
|
## Build libvulkan.so }}}
|