blob: 47c7c5c5508e4ea085a24bee2284110f8aad5e52 [file]
# Copyright 2024 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/components.gni")
import("//src/graphics/examples/vkproto/common/common.gni")
import("//src/lib/vulkan/vulkan.gni")
fuchsia_test_component("init_only_cmp") {
manifest = "meta/init_only.cml"
deps = [
":bin",
"//src/lib/vulkan/validation_layers",
]
test_type = "vulkan"
}
config("vulkan_sdk_linux_config") {
# Specify the include/lib dirs and linked libraries for use with the
# downloaded LunarG Vulkan SDK.
vulkan_sdk = "//prebuilt/third_party/vulkansdk/linux/x86_64"
include_dirs = [ "$vulkan_sdk/include" ]
lib_dirs = [ "$vulkan_sdk/lib" ]
libs = [ "vulkan" ]
}
executable("bin") {
output_name = "init-only"
testonly = true
sources = [ "main.cc" ]
include_dirs = [ "//src/graphics/examples/vkproto/common" ]
defines = [ "VULKAN_HPP_NO_EXCEPTIONS" ]
deps = [
"../common:srcs",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
]
if (is_fuchsia) {
include_dirs += [ "//src/graphics/examples/vkproto/fuchsia" ]
deps += [ "//src/lib/vulkan" ]
if (is_linux) {
configs += [ ":vulkan_sdk_linux_config($host_toolchain)" ]
}
}
}
#
# Linux / Mac Build
#
group("init-only-host") {
testonly = true
deps = [ ":bin($host_toolchain)" ]
}
fuchsia_test_package("init-only") {
package_name = "init-only"
test_components = [ ":init_only_cmp" ]
test_specs = {
environments = vulkan_envs
}
}
group("init_only") {
testonly = true
deps = [ ":init-only" ]
}