Skip to content

Commit

Permalink
Copy dependent libraries in Pythonic way.
Browse files Browse the repository at this point in the history
  • Loading branch information
PengZheng committed Mar 7, 2024
1 parent acabf59 commit 3bd5474
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ def generate(self):
# tc.cache_variables["CMAKE_PROJECT_Celix_INCLUDE"] = os.path.join(self.build_folder, "conan_paths.cmake")
# the following is workaround for https://github.com/conan-io/conan/issues/7192
for dep in self.dependencies.host.values():
if dep.cpp_info.libdirs:
copy(self, "*", dep.cpp_info.libdir, os.path.join(self.build_folder, "lib"))
for ld in dep.cpp_info.libdirs:
copy(self, "*", ld, os.path.join(self.build_folder, "lib"))
tc.cache_variables["CMAKE_BUILD_RPATH"] = os.path.join(self.build_folder, "lib")
v = Version(self.version)
tc.cache_variables["CELIX_MAJOR"] = str(v.major.value)
Expand Down
4 changes: 2 additions & 2 deletions examples/conan_test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def generate(self):
tc.cache_variables["TEST_COMPONENTS_READY_CHECK"] = self.options["celix"].build_components_ready_check
# the following is workaround https://github.com/conan-io/conan/issues/7192
for dep in self.dependencies.host.values():
if dep.cpp_info.libdirs:
copy(self, "*", dep.cpp_info.libdir, os.path.join(self.build_folder, "lib"))
for ld in dep.cpp_info.libdirs:
copy(self, "*", ld, os.path.join(self.build_folder, "lib"))
tc.cache_variables["CMAKE_BUILD_RPATH"] = os.path.join(self.build_folder, "lib")
tc.user_presets_path = False
tc.generate()
Expand Down
4 changes: 2 additions & 2 deletions examples/conan_test_package_v2/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ def generate(self):
tc.cache_variables["TEST_COMPONENTS_READY_CHECK"] = celix_options.build_components_ready_check
# the following is workaround https://github.com/conan-io/conan/issues/7192
for dep in self.dependencies.host.values():
if dep.cpp_info.libdirs:
copy(self, "*", dep.cpp_info.libdir, os.path.join(self.build_folder, "lib"))
for ld in dep.cpp_info.libdirs:
copy(self, "*", ld, os.path.join(self.build_folder, "lib"))
tc.cache_variables["CMAKE_BUILD_RPATH"] = os.path.join(self.build_folder, "lib")
tc.user_presets_path = False
tc.generate()
Expand Down

0 comments on commit 3bd5474

Please sign in to comment.