Skip to content

Commit 95b0987

Browse files
committed
vulkan-utility-libraries: version 1.4.313.0
1 parent bf41b3c commit 95b0987

File tree

6 files changed

+97
-0
lines changed

6 files changed

+97
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sources:
2+
"1.4.313.0":
3+
url: "https://github.com/KhronosGroup/Vulkan-Utility-Libraries/archive/refs/tags/vulkan-sdk-1.4.313.0.tar.gz"
4+
sha256: "3e04f32c6023997c153ad4b63e2fd344257e40a57ff5229ab7373e08a4fa2dd2"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import os
2+
3+
from conan import ConanFile
4+
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
5+
from conan.tools.files import copy, get
6+
7+
required_conan_version = ">=2.0"
8+
9+
10+
class VulkanUtilityLibrariesConan(ConanFile):
11+
name = "vulkan-utility-libraries"
12+
homepage = "https://github.com/KhronosGroup/Vulkan-Utility-Libraries/tree/main"
13+
description = "Utility libraries for Vulkan developers"
14+
license = "Apache-2.0"
15+
topics = ("vulkan-headers", "vulkan", "gpu")
16+
url = "https://github.com/conan-io/conan-center-index"
17+
package_type = "static-library"
18+
settings = "os", "arch", "compiler", "build_type"
19+
20+
def layout(self):
21+
cmake_layout(self, src_folder="src")
22+
23+
def requirements(self):
24+
self.requires(f"vulkan-headers/{self.version}", transitive_headers=True)
25+
26+
def source(self):
27+
get(self, **self.conan_data["sources"][self.version], strip_root=True)
28+
29+
def generate(self):
30+
tc = CMakeToolchain(self)
31+
tc.generate()
32+
33+
def build(self):
34+
cmake = CMake(self)
35+
cmake.configure()
36+
cmake.build()
37+
38+
def package(self):
39+
copy(self, "LICENSE*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
40+
cmake = CMake(self)
41+
cmake.install()
42+
43+
def package_info(self):
44+
self.cpp_info.set_property("cmake_file_name", "VulkanUtilityLibraries")
45+
self.cpp_info.set_property("cmake_target_name", "Vulkan::UtilityLibraries")
46+
self.cpp_info.libs = ["VulkanLayerSettings", "VulkanSafeStruct"]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cmake_minimum_required(VERSION 3.15)
2+
project(test_package LANGUAGES CXX)
3+
4+
find_package(VulkanUtilityLibraries REQUIRED)
5+
6+
add_executable(${PROJECT_NAME} test_package.cpp)
7+
target_link_libraries(${PROJECT_NAME} PRIVATE Vulkan::UtilityLibraries)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from conan import ConanFile
2+
from conan.tools.build import can_run
3+
from conan.tools.cmake import CMake, cmake_layout
4+
import os
5+
6+
7+
class TestPackageConan(ConanFile):
8+
settings = "os", "arch", "compiler", "build_type"
9+
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"
10+
test_type = "explicit"
11+
12+
def layout(self):
13+
cmake_layout(self)
14+
15+
def requirements(self):
16+
self.requires(self.tested_reference_str)
17+
18+
def build(self):
19+
cmake = CMake(self)
20+
cmake.configure()
21+
cmake.build()
22+
23+
def test(self):
24+
if can_run(self):
25+
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
26+
self.run(bin_path, env="conanrun")
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <vulkan/utility/vk_safe_struct.hpp>
2+
#include <vulkan/layer/vk_layer_settings.h>
3+
4+
int main(int argc, char ** argv)
5+
{
6+
const vku::safe_VkDescriptorPoolCreateInfo safe_create_info;
7+
8+
VkuLayerSettingLogCallback pCallback{nullptr};
9+
10+
return 0;
11+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
versions:
2+
"1.4.313.0":
3+
folder: all

0 commit comments

Comments
 (0)