Skip to content

Commit

Permalink
improved conan v2 compatiblity
Browse files Browse the repository at this point in the history
  • Loading branch information
psyinf committed Jul 29, 2023
1 parent 70a1ded commit b977a88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions recipes/vsgxchange/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def configure(self):

def requirements(self):
self.requires("vulkan-loader/1.3.239.0")
self.requires("vsg/[>1.0.3]")
self.requires("vsg/1.0.3")
#optional
if self.options.with_curl:
self.requires("libcurl/8.0.0")
Expand All @@ -76,14 +76,13 @@ def validate(self):
)

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)
if is_msvc(self):
tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = False

tc.variables["VSG_MACRO_DIR"] = os.path.join(self.deps_cpp_info["vsg"].rootpath, "lib/cmake/vsg/").replace("\\","/")
tc.variables["VSG_MACRO_DIR"] = os.path.join(self.dependencies["vsg"].cpp_info.libdirs[0], "cmake/vsg/").replace("\\","/")

tc.generate()

Expand Down
2 changes: 1 addition & 1 deletion recipes/vsgxchange/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ find_package(Vulkan REQUIRED CONFIG)
find_package(curl REQUIRED CONFIG)

add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE vsgXchange::vsgXchange)
target_link_libraries(${PROJECT_NAME} PRIVATE vsgXchange::vsgXchange vsg::vsg)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)

0 comments on commit b977a88

Please sign in to comment.