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

pengzheng pushed a commit to branch feature/579-automatic-dependency-deduction
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 277e537e2fd93c86b272da8223cf97d712ca2753
Author: PengZheng <[email protected]>
AuthorDate: Thu Jul 13 21:15:12 2023 +0800

    Fix `conan create` errors.
---
 CMakeLists.txt | 6 ++++++
 conanfile.py   | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b050b7f..a1914913 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -172,6 +172,12 @@ include(CheckLinkerFlag)
 check_linker_flag(CXX LINKER:--wrap,celix_nonexistent_symbol 
LINKER_WRAP_SUPPORTED)
 cmake_pop_check_state()
 
+# avoid unknown export "celix" error when building nothing
+add_library(celix INTERFACE)
+add_library(Celix::celix ALIAS celix)
+install(TARGETS celix EXPORT celix DESTINATION ${CMAKE_INSTALL_LIBDIR} 
COMPONENT framework
+        INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix)
+
 #Add generate_export_header to cmake
 include(GenerateExportHeader)
 
diff --git a/conanfile.py b/conanfile.py
index 80101261..8f869b22 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -262,7 +262,7 @@ class CelixConan(ConanFile):
         if self.options.build_pubsub_wire_protocol_v2:
             self.options.build_pubsub = True
 
-        if self.options.build_pubsub_json_serializer or 
self.build_pubsub_avrobin_serializer:
+        if self.options.build_pubsub_json_serializer or 
self.options.build_pubsub_avrobin_serializer:
             self.options.build_pubsub = True
 
         if self.options.build_pubsub:
@@ -378,7 +378,7 @@ class CelixConan(ConanFile):
             self.options['zeromq'].shared = True
             self.requires("czmq/4.2.0")
             self.options['czmq'].shared = True
-        if self.options.build_http_admin or 
self.options.build_rsa_discovery_commonor \
+        if self.options.build_http_admin or 
self.options.build_rsa_discovery_common \
                 or self.options.build_rsa_remote_service_admin_dfi:
             self.requires("civetweb/1.15")
             self.options['civetweb'].shared = True

Reply via email to