CELIX-412: Some more refactoring for update Celix CMake function names
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2fbf62d..8151cd2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -91,7 +91,7 @@
include_directories(framework/public/include)
add_subdirectory(launcher)
-add_subdirectory(config_admin)
+#add_subdirectory(config_admin) config admin is unstable
add_subdirectory(device_access)
add_subdirectory(deployment_admin)
add_subdirectory(remote_services)
diff --git a/cmake/cmake_celix/BundlePackaging.cmake b/cmake/cmake_celix/BundlePackaging.cmake
index 7a126e9..e336dbb 100644
--- a/cmake/cmake_celix/BundlePackaging.cmake
+++ b/cmake/cmake_celix/BundlePackaging.cmake
@@ -338,7 +338,7 @@
if ("${LIB}" STREQUAL "${BUNDLE}")
#ignore. Do not have to link agaist own lib
elseif(IS_LIB)
- target_link_libraries(${BUNDLE} ${LIB})
+ target_link_libraries(${BUNDLE} PRIVATE ${LIB})
endif()
endforeach()
@@ -370,7 +370,7 @@
list(APPEND LIBS "$<TARGET_SONAME_FILE_NAME:${LIB}>")
endif()
- target_link_libraries(${BUNDLE} ${LIB})
+ target_link_libraries(${BUNDLE} PRIVATE ${LIB})
endforeach()
diff --git a/device_access/example/CMakeLists.txt b/device_access/example/CMakeLists.txt
index 89b4f21..f7062b4 100644
--- a/device_access/example/CMakeLists.txt
+++ b/device_access/example/CMakeLists.txt
@@ -25,7 +25,7 @@
BUNDLES device_manager driver_locator shell shell_tui log_service base_driver
)
- deploy_bundles_dir(device_access_example
+ celix_container_bundles_dir(device_access_example
DIR_NAME "drivers"
BUNDLES word_consumingdriver char_refiningdriver
)
diff --git a/framework/private/src/celix_launcher.c b/framework/private/src/celix_launcher.c
index 16410bc..126d8d3 100644
--- a/framework/private/src/celix_launcher.c
+++ b/framework/private/src/celix_launcher.c
@@ -244,11 +244,13 @@
unsigned int i;
linkedList_create(&bundles);
- result = strtok_r(autoStart, delims, &save_ptr);
- while (result != NULL) {
- char *location = strdup(result);
- linkedList_addElement(bundles, location);
- result = strtok_r(NULL, delims, &save_ptr);
+ if (autoStart != NULL) {
+ result = strtok_r(autoStart, delims, &save_ptr);
+ while (result != NULL) {
+ char *location = strdup(result);
+ linkedList_addElement(bundles, location);
+ result = strtok_r(NULL, delims, &save_ptr);
+ }
}
// First install all bundles
// Afterwards start them
diff --git a/pubsub/CMakeLists.txt b/pubsub/CMakeLists.txt
index 2c2c50f..5afc296 100644
--- a/pubsub/CMakeLists.txt
+++ b/pubsub/CMakeLists.txt
@@ -41,7 +41,7 @@
if (ENABLE_TESTING)
option(BUILD_PUBSUB_TESTS "Enable Tests for PUBSUB" OFF)
endif()
- if (ENABLE_TESTING AND BUILD_PUBSUB_TESTS)
+ if (ENABLE_TESTING AND BUILD_PUBSUB_TESTS AND BUILD_PUBSUB_PSA_ZMQ)
add_subdirectory(test)
endif()
diff --git a/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt b/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt
index d2bd754..fef69e4 100644
--- a/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt
+++ b/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt
@@ -30,19 +30,19 @@
${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
-bundle_files(org.apache.celix.pubsub_publisher.MpPublisher
+celix_bundle_files(org.apache.celix.pubsub_publisher.MpPublisher
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_ew.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_ide.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_kinematics.descriptor
DESTINATION "META-INF/descriptors"
)
-bundle_files(org.apache.celix.pubsub_publisher.MpPublisher
+celix_bundle_files(org.apache.celix.pubsub_publisher.MpPublisher
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/publisher
DESTINATION "META-INF/keys"
)
-bundle_files(org.apache.celix.pubsub_publisher.MpPublisher
+celix_bundle_files(org.apache.celix.pubsub_publisher.MpPublisher
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/subscriber/public
DESTINATION "META-INF/keys/subscriber"
)
diff --git a/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt b/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt
index 32258a8..f2d2aaa 100644
--- a/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt
+++ b/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt
@@ -30,19 +30,19 @@
${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
-bundle_files( org.apache.celix.pubsub_subscriber.MpSubscriber
+celix_bundle_files( org.apache.celix.pubsub_subscriber.MpSubscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_ew.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_ide.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_kinematics.descriptor
DESTINATION "META-INF/descriptors"
)
-bundle_files(org.apache.celix.pubsub_subscriber.MpSubscriber
+celix_bundle_files(org.apache.celix.pubsub_subscriber.MpSubscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/subscriber
DESTINATION "META-INF/keys"
)
-bundle_files(org.apache.celix.pubsub_subscriber.MpSubscriber
+celix_bundle_files(org.apache.celix.pubsub_subscriber.MpSubscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/publisher/public
DESTINATION "META-INF/keys/publisher"
)
diff --git a/pubsub/examples/pubsub/publisher/CMakeLists.txt b/pubsub/examples/pubsub/publisher/CMakeLists.txt
index 2f7d671..dec002d 100644
--- a/pubsub/examples/pubsub/publisher/CMakeLists.txt
+++ b/pubsub/examples/pubsub/publisher/CMakeLists.txt
@@ -29,24 +29,24 @@
${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi1.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi2.descriptor
DESTINATION "META-INF/descriptors"
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi1.properties
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi2.properties
DESTINATION "META-INF/topics/pub"
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/publisher
DESTINATION "META-INF/keys"
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/subscriber/public
DESTINATION "META-INF/keys/subscriber"
)
diff --git a/pubsub/examples/pubsub/publisher2/CMakeLists.txt b/pubsub/examples/pubsub/publisher2/CMakeLists.txt
index c03ac64..1defeb0 100644
--- a/pubsub/examples/pubsub/publisher2/CMakeLists.txt
+++ b/pubsub/examples/pubsub/publisher2/CMakeLists.txt
@@ -29,24 +29,24 @@
${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi1.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi2.descriptor
DESTINATION "META-INF/descriptors"
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi1.properties
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi2.properties
DESTINATION "META-INF/topics/pub"
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/publisher
DESTINATION "META-INF/keys"
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/subscriber/public
DESTINATION "META-INF/keys/subscriber"
)
diff --git a/pubsub/examples/pubsub/subscriber/CMakeLists.txt b/pubsub/examples/pubsub/subscriber/CMakeLists.txt
index 7f28dfe..8bcec93 100644
--- a/pubsub/examples/pubsub/subscriber/CMakeLists.txt
+++ b/pubsub/examples/pubsub/subscriber/CMakeLists.txt
@@ -30,24 +30,24 @@
${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
-bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
+celix_bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi1.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi2.descriptor
DESTINATION "META-INF/descriptors"
)
-bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
+celix_bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi1.properties
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi2.properties
DESTINATION "META-INF/topics/sub"
)
-bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
+celix_bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/subscriber
DESTINATION "META-INF/keys"
)
-bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
+celix_bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/publisher/public
DESTINATION "META-INF/keys/publisher"
)
diff --git a/pubsub/pubsub_topology_manager/CMakeLists.txt b/pubsub/pubsub_topology_manager/CMakeLists.txt
index 680673b..a064143 100644
--- a/pubsub/pubsub_topology_manager/CMakeLists.txt
+++ b/pubsub/pubsub_topology_manager/CMakeLists.txt
@@ -34,7 +34,7 @@
${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
-bundle_files(org.apache.celix.pubsub_topology_manager.PubSubTopologyManager
+celix_bundle_files(org.apache.celix.pubsub_topology_manager.PubSubTopologyManager
${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include/pubsub_topic_info.descriptor
DESTINATION "META-INF/descriptors/services"
)
diff --git a/pubsub/test/CMakeLists.txt b/pubsub/test/CMakeLists.txt
index 4150b3e..41fffe0 100644
--- a/pubsub/test/CMakeLists.txt
+++ b/pubsub/test/CMakeLists.txt
@@ -32,7 +32,7 @@
VERSION 1.0.0
)
target_link_libraries(pubsub_sut celix_framework celix_utils)
-bundle_files(pubsub_sut
+celix_bundle_files(pubsub_sut
msg_descriptors/msg.descriptor
msg_descriptors/sync.descriptor
DESTINATION "META-INF/descriptors/messages"
@@ -71,7 +71,7 @@
target_link_libraries(pubsub_tst celix_framework celix_utils)
endif ()
-bundle_files(pubsub_tst
+celix_bundle_files(pubsub_tst
msg_descriptors/msg.descriptor
msg_descriptors/sync.descriptor
DESTINATION "META-INF/descriptors/messages"
diff --git a/remote_services/examples/CMakeLists.txt b/remote_services/examples/CMakeLists.txt
index b919760..8916a18 100644
--- a/remote_services/examples/CMakeLists.txt
+++ b/remote_services/examples/CMakeLists.txt
@@ -37,7 +37,7 @@
DISCOVERY_CFG_POLL_ENDPOINTS=http://localhost:8082/org.apache.celix.discovery.configured
DISCOVERY_CFG_SERVER_PORT=8081
)
- deploy_bundles_dir(remote-services-cfg-server DIR_NAME "endpoints" BUNDLES
+ celix_container_bundles_dir(remote-services-cfg-server DIR_NAME "endpoints" BUNDLES
org.apache.celix.calc.api.Calculator_endpoint
org.apache.celix.calc.api.Calculator2_endpoint
)
@@ -51,7 +51,7 @@
DISCOVERY_CFG_POLL_ENDPOINTS=http://localhost:8081/org.apache.celix.discovery.configured
DISCOVERY_CFG_SERVER_PORT=8082
)
- deploy_bundles_dir(remote-services-cfg-client DIR_NAME "endpoints"
+ celix_container_bundles_dir(remote-services-cfg-client DIR_NAME "endpoints"
BUNDLES org.apache.celix.calc.api.Calculator_proxy org.apache.celix.calc.api.Calculator2_proxy
)
endif()
@@ -62,7 +62,7 @@
GROUP "remote-services/remote-services-shm"
BUNDLES discovery_shm topology_manager remote_service_admin_shm calculator shell shell_tui log_service log_writer
)
- deploy_bundles_dir(remote-services-shm DIR_NAME "endpoints"
+ celix_container_bundles_dir(remote-services-shm DIR_NAME "endpoints"
BUNDLES org.apache.celix.calc.api.Calculator_endpoint
)
@@ -71,7 +71,7 @@
GROUP "remote-services/remote-services-shm"
BUNDLES topology_manager remote_service_admin_shm shell shell_tui log_service log_writer calculator_shell discovery_shm
)
- deploy_bundles_dir(remote-services-shm-client DIR_NAME "endpoints"
+ celix_container_bundles_dir(remote-services-shm-client DIR_NAME "endpoints"
BUNDLES org.apache.celix.calc.api.Calculator_proxy
)
endif ()
@@ -82,7 +82,7 @@
GROUP "remote-services/remote-services-etcd"
BUNDLES discovery_etcd topology_manager remote_service_admin_http calculator shell shell_tui log_service log_writer
)
- deploy_bundles_dir(remote-services-etcd DIR_NAME "endpoints"
+ celix_container_bundles_dir(remote-services-etcd DIR_NAME "endpoints"
BUNDLES
org.apache.celix.calc.api.Calculator_endpoint
org.apache.celix.calc.api.Calculator2_endpoint
@@ -93,7 +93,7 @@
GROUP "remote-services/remote-services-etcd"
BUNDLES topology_manager remote_service_admin_http shell shell_tui log_service log_writer calculator_shell discovery_etcd
)
- deploy_bundles_dir(remote-services-etcd-client DIR_NAME "endpoints"
+ celix_container_bundles_dir(remote-services-etcd-client DIR_NAME "endpoints"
BUNDLES org.apache.celix.calc.api.Calculator_proxy
)
endif ()
diff --git a/remote_services/examples/calculator_service/CMakeLists.txt b/remote_services/examples/calculator_service/CMakeLists.txt
index d1cf31d..32cbea2 100644
--- a/remote_services/examples/calculator_service/CMakeLists.txt
+++ b/remote_services/examples/calculator_service/CMakeLists.txt
@@ -31,7 +31,7 @@
VERSION 0.0.1
)
-bundle_files(calculator public/include/org.apache.celix.calc.api.Calculator2.descriptor
+celix_bundle_files(calculator public/include/org.apache.celix.calc.api.Calculator2.descriptor
DESTINATION .)
target_link_libraries(calculator celix_framework)
diff --git a/remote_services/examples/calculator_shell/CMakeLists.txt b/remote_services/examples/calculator_shell/CMakeLists.txt
index f6948a0..2a49b3b 100644
--- a/remote_services/examples/calculator_shell/CMakeLists.txt
+++ b/remote_services/examples/calculator_shell/CMakeLists.txt
@@ -34,7 +34,7 @@
SYMBOLIC_NAME "apache_celix_remoting_calculator_shell"
)
-bundle_files(calculator_shell
+celix_bundle_files(calculator_shell
../calculator_service/public/include/org.apache.celix.calc.api.Calculator2.descriptor
#private/include/org.apache.celix.calc.api.Calculator2.descriptor ##Use this descriptor in case you want to try out versioning!
DESTINATION .
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt b/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
index d25517e..41fbccc 100644
--- a/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
@@ -29,7 +29,7 @@
tst_activator.c
)
-bundle_files(rsa_dfi_tst_bundle
+celix_bundle_files(rsa_dfi_tst_bundle
${PROJECT_SOURCE_DIR}/remote_services/examples/calculator_service/public/include/org.apache.celix.calc.api.Calculator2.descriptor
DESTINATION .
)
diff --git a/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt b/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
index df49a95..6cf53fb 100644
--- a/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
+++ b/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
@@ -27,7 +27,7 @@
SOURCES
tst_activator.c
)
-bundle_files(topology_manager_test_bundle
+celix_bundle_files(topology_manager_test_bundle
org.apache.celix.test.MyBundle.descriptor
DESTINATION .
)