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

commit 09cfcaee91894fc64965349f020f8f4ba6b7087f
Author: PengZheng <[email protected]>
AuthorDate: Wed Mar 6 22:02:07 2024 +0800

    Revert "Fix copy error in generate method."
    
    This reverts commit 1db9b858
---
 .github/workflows/conan_create.yml          | 2 +-
 conanfile.py                                | 8 ++------
 examples/conan_test_package/conanfile.py    | 5 +----
 examples/conan_test_package_v2/conanfile.py | 6 ++----
 4 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/conan_create.yml 
b/.github/workflows/conan_create.yml
index dc2dfeba..575cab42 100644
--- a/.github/workflows/conan_create.yml
+++ b/.github/workflows/conan_create.yml
@@ -110,7 +110,7 @@ jobs:
             ${{ runner.os }}-ccache-Release-
       - name: Create Celix
         run: |
-          conan create . -c tools.cmake.cmaketoolchain:generator=Ninja -b 
missing -o celix/*:build_all=True  -o celix/*:enable_ccache=True -pr:b default 
-pr:h default -s:b build_type=Release -s:h build_type=Release -tf 
examples/conan_test_package_v2 -o celix/*:celix_cxx17=True -o 
celix/*:celix_install_deprecated_api=True -vvv
+          conan create . -c tools.cmake.cmaketoolchain:generator=Ninja -b 
missing -o celix/*:build_all=True  -o celix/*:enable_ccache=True -pr:b default 
-pr:h default -s:b build_type=Release -s:h build_type=Release -tf 
examples/conan_test_package_v2 -o celix/*:celix_cxx17=True -o 
celix/*:celix_install_deprecated_api=True
       - name: Dependency Deduction Test
         run: |
           conan inspect .  | awk 'BEGIN { FS="[\t:]+"; output=0 } /build/ && 
!/build_all/ && !/build_rsa_remote_service_admin_shm_v2/ && 
!/build_rsa_discovery_zeroconf/ { if(output) print $1} /^options/ {output=1} 
/^options_definitions/ {output=0}' | while read option; do conan build . -c 
tools.cmake.cmaketoolchain:generator=Ninja -b missing -o celix/*:${option}=True 
 -pr:b default -pr:h default -s:b build_type=Release -s:h build_type=Release 
-of  ${option}_dir -o celix/*:celix_cxx17=Tru [...]
diff --git a/conanfile.py b/conanfile.py
index 6fb5f59d..e1b8003b 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -345,12 +345,8 @@ 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():
-            self.output.info(dep.cpp_info.libdir)
-            self.output.info(os.path.join(self.build_folder, "lib"))
-            if self.settings.os == "Linux":
-                copy(self, "*.so*", dep.cpp_info.libdir, 
os.path.join(self.build_folder, "lib"))
-            elif self.settings.os == "Macos":
-                copy(self, "*.dylib", dep.cpp_info.libdir, 
os.path.join(self.build_folder, "lib"))
+            copy(self, "*.dylib", dep.cpp_info.libdir, 
os.path.join(self.build_folder, "lib"))
+            copy(self, "*.so*", 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)
         tc.cache_variables["CELIX_MAJOR"] = str(v.major.value)
diff --git a/examples/conan_test_package/conanfile.py 
b/examples/conan_test_package/conanfile.py
index 9fb0648b..2fd75fbc 100644
--- a/examples/conan_test_package/conanfile.py
+++ b/examples/conan_test_package/conanfile.py
@@ -25,10 +25,7 @@ class TestPackageConan(ConanFile):
     # requires = "celix/2.3.0@docker/test"
 
     def imports(self):
-        if self.settings.os == "Linux":
-            self.copy("*.so*", src="@libdirs", dst="lib")
-        elif self.settings.os == "Macos":
-            self.copy("*.dylib", src="@libdirs", dst="lib")
+        self.copy("*", src="@libdirs", dst="lib")
 
     def build(self):
         cmake = CMake(self)
diff --git a/examples/conan_test_package_v2/conanfile.py 
b/examples/conan_test_package_v2/conanfile.py
index 5241122f..3906d3f0 100644
--- a/examples/conan_test_package_v2/conanfile.py
+++ b/examples/conan_test_package_v2/conanfile.py
@@ -67,10 +67,8 @@ 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 self.settings.os == "Linux":
-                copy(self, "*.so*", dep.cpp_info.libdir, 
os.path.join(self.build_folder, "lib"))
-            elif self.settings.os == "Macos":
-                copy(self, "*.dylib", dep.cpp_info.libdir, 
os.path.join(self.build_folder, "lib"))
+            copy(self, "*.dylib", dep.cpp_info.libdir, 
os.path.join(self.build_folder, "lib"))
+            copy(self, "*.so*", 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
         tc.generate()

Reply via email to