This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch hotfix/conan-private-dep
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/hotfix/conan-private-dep by 
this push:
     new fdf96fd1 Fix assertion failure when dep.cpp_info.libdir is None.
fdf96fd1 is described below

commit fdf96fd138578576631473ecfbc710b335832b77
Author: PengZheng <[email protected]>
AuthorDate: Wed Mar 6 22:12:19 2024 +0800

    Fix assertion failure when dep.cpp_info.libdir is None.
---
 conanfile.py                                | 2 +-
 examples/conan_test_package_v2/conanfile.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/conanfile.py b/conanfile.py
index 35d4e2b9..e91dd796 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -345,7 +345,7 @@ class CelixConan(ConanFile):
         # 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.libdir is not None:
+            if dep.cpp_info.libdirs:
                 copy(self, "*", dep.cpp_info.libdir, 
os.path.join(self.build_folder, "lib"))
         tc.cache_variables["CMAKE_BUILD_RPATH"] = 
os.path.join(self.build_folder, "lib")
         v = Version(self.version)
diff --git a/examples/conan_test_package_v2/conanfile.py 
b/examples/conan_test_package_v2/conanfile.py
index 9d0d63a3..f44a5ca3 100644
--- a/examples/conan_test_package_v2/conanfile.py
+++ b/examples/conan_test_package_v2/conanfile.py
@@ -67,7 +67,7 @@ class TestPackageConan(ConanFile):
         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.libdir is not None:
+            if dep.cpp_info.libdirs:
                 copy(self, "*", dep.cpp_info.libdir, 
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

Reply via email to