Skip to content

Commit

Permalink
(#16298) volk: add 1.3.239.0 + modernize more for conan v2
Browse files Browse the repository at this point in the history
* add volk/1.3.239.0

* modernize more
  • Loading branch information
SpaceIm authored Mar 25, 2023
1 parent 5d72a9a commit 73068cb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
3 changes: 3 additions & 0 deletions recipes/volk/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.3.239.0":
url: "https://github.com/zeux/volk/archive/refs/tags/sdk-1.3.239.0.tar.gz"
sha256: "b628ae7d4e554c20763ac34e1fd18b87725c0c346e2a7106fa23701877bbac65"
"1.3.236.0":
url: "https://github.com/zeux/volk/archive/refs/tags/sdk-1.3.236.0.tar.gz"
sha256: "fba21aeccd8df4ce49fd0cce54cc9b1808e24e4283cad733f65fdd52f1729f16"
Expand Down
18 changes: 6 additions & 12 deletions recipes/volk/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from conan.tools.files import copy, get, replace_in_file, rmdir
import os

required_conan_version = ">=1.47.0"
required_conan_version = ">=1.53.0"


class VolkConan(ConanFile):
Expand All @@ -22,6 +22,7 @@ class VolkConan(ConanFile):
)
topics = ("vulkan", "loader", "extension", "entrypoint", "graphics")

package_type = "static-library"
settings = "os", "arch", "compiler", "build_type"
options = {
"fPIC": [True, False],
Expand All @@ -35,24 +36,17 @@ def config_options(self):
del self.options.fPIC

def configure(self):
try:
del self.settings.compiler.libcxx
except Exception:
pass
try:
del self.settings.compiler.cppstd
except Exception:
pass
self.settings.rm_safe("compiler.cppstd")
self.settings.rm_safe("compiler.libcxx")

def layout(self):
cmake_layout(self, src_folder="src")

def requirements(self):
self.requires(f"vulkan-headers/{self.version}")
self.requires(f"vulkan-headers/{self.version}", transitive_headers=True)

def source(self):
get(self, **self.conan_data["sources"][self.version],
destination=self.source_folder, strip_root=True)
get(self, **self.conan_data["sources"][self.version], strip_root=True)

def generate(self):
tc = CMakeToolchain(self)
Expand Down
2 changes: 2 additions & 0 deletions recipes/volk/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.3.239.0":
folder: "all"
"1.3.236.0":
folder: "all"
"1.3.231.1":
Expand Down

0 comments on commit 73068cb

Please sign in to comment.