This is an automated email from the ASF dual-hosted git repository. pnoltes pushed a commit to branch feature/add_find_dep_to_cmake_config in repository https://gitbox.apache.org/repos/asf/celix.git
commit 0df8249d8e82b38b02de95afb85d7d5808d7f49d Author: Pepijn Noltes <[email protected]> AuthorDate: Sat Aug 28 17:16:57 2021 +0200 Updates the use of find_dependency based on imported targets --- cmake/CelixConfig.cmake | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/cmake/CelixConfig.cmake b/cmake/CelixConfig.cmake index 6c7acb4..b1e1efe 100644 --- a/cmake/CelixConfig.cmake +++ b/cmake/CelixConfig.cmake @@ -50,7 +50,6 @@ set(CELIX_INCLUDE_DIRS set(CELIX_FRAMEWORK_LIBRARY Celix::framework) set(CELIX_UTILS_LIBRARY Celix::utils) set(CELIX_DFI_LIBRARY Celix::dfi) - set(CELIX_LAUNCHER Celix::launcher) if (TARGET Celix::etcdlib) @@ -73,9 +72,25 @@ set(CELIX_SHELL_BUNDLE ${CELIX_BUNDLES_DIR}/shell.zip) set(CELIX_SHELL_TUI_BUNDLE ${CELIX_BUNDLES_DIR}/shell_tui.zip) include(CMakeFindDependencyMacro) -find_dependency(ZLIB) -find_dependency(UUID) -find_dependency(OpenSSL) -find_dependency(CURL) -find_dependency(FFI) -find_dependency(Jansson) \ No newline at end of file + +find_dependency(ZLIB REQUIRED) #Needed by framework +find_dependency(UUID REQUIRED) #Needed by framework +find_dependency(CURL REQUIRED) #Needed by framework (used for curl initialization) +find_dependency(Jansson REQUIRED) #Needed by dfi, etcdlib, remote services, pubsub + +if (TARGET Celix::dfi) + find_dependency(FFI REQUIRED) +endif() +if (TARGET Celix::RsaConfiguredDiscovery) + find_dependency(RapidJSON REQUIRED) +endif () +if (TARGET Celix::rsa_discovery_common) + find_dependency(LibXml2 REQUIRED) +endif () +if (TARGET Celix::celix_pubsub_admin_zmq OR TARGET Celix::celix_pubsub_admin_zmq_v2) + find_dependency(ZMQ REQUIRED) + find_dependency(CZMQ REQUIRED) +endif () +if (TARGET Celix::pubsub_admin_nanomsg) + find_dependency(NanoMsg REQUIRED) +endif () \ No newline at end of file
