Skip to content

Commit 017b236

Browse files
committed
vulkan-tools: version 1.4.313.0
1 parent 41e606f commit 017b236

File tree

4 files changed

+78
-0
lines changed

4 files changed

+78
-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-Tools/archive/refs/tags/vulkan-sdk-1.4.313.0.tar.gz"
4+
sha256: "6b88045c8cad7bd042e202826d8b597c657b9a422ca1f89fc3b0ab2dd64c5a0f"

recipes/vulkan-tools/all/conanfile.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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 VulkanToolsConan(ConanFile):
11+
name = "vulkan-tools"
12+
homepage = "https://github.com/KhronosGroup/Vulkan-Profiles"
13+
description = "Vulkan Development Tools"
14+
license = "Apache-2.0"
15+
topics = ("vulkan-tools", "vulkan", "gpu")
16+
url = "https://github.com/conan-io/conan-center-index"
17+
package_type = "application"
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+
if self.settings.os != "Android":
26+
self.requires(f"vulkan-loader/{self.version}", transitive_headers=True)
27+
28+
def source(self):
29+
get(self, **self.conan_data["sources"][self.version], strip_root=True)
30+
31+
def generate(self):
32+
tc = CMakeToolchain(self)
33+
tc.variables["BUILD_TESTS"] = False
34+
tc.variables["TOOLS_CODEGEN"] = False
35+
tc.generate()
36+
37+
def build(self):
38+
cmake = CMake(self)
39+
cmake.configure()
40+
cmake.build()
41+
42+
def package(self):
43+
copy(self, "LICENSE*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
44+
cmake = CMake(self)
45+
cmake.install()
46+
47+
def package_info(self):
48+
#self.cpp_info.set_property("cmake_file_name", "VulkanTools")
49+
#self.cpp_info.set_property("cmake_target_name", "Vulkan::Tools")
50+
#self.cpp_info.libs = ["VulkanLayerSettings", "VulkanSafeStruct"]
51+
bin_path = os.path.join(self.package_folder, "bin")
52+
self.output.info(f"Appending PATH environment variable: {bin_path}")
53+
self.env_info.path.append(bin_path)
54+
55+
self.cpp_info.includedirs = []
56+
self.cpp_info.libdirs = []
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from conan import ConanFile
2+
from conan.tools.build import can_run
3+
4+
5+
class TestPackageConan(ConanFile):
6+
settings = "os", "arch", "compiler", "build_type"
7+
generators = "VirtualBuildEnv"
8+
test_type = "explicit"
9+
10+
def build_requirements(self):
11+
self.tool_requires(self.tested_reference_str)
12+
13+
def test(self):
14+
if can_run(self):
15+
self.run("vulkaninfo")

recipes/vulkan-tools/config.yml

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)