You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2018/02/06 19:53:31 UTC
celix git commit: CELIX-417: Fixes an issues with handling alias
libraries in the celix_bundle_..._libs CMake commands and adds the dfi lib to
the rsa dfi
Repository: celix
Updated Branches:
refs/heads/develop 06bcd4ece -> 6cd9df7ec
CELIX-417: Fixes an issues with handling alias libraries in the celix_bundle_..._libs CMake commands and adds the dfi lib to the rsa dfi
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/6cd9df7e
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/6cd9df7e
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/6cd9df7e
Branch: refs/heads/develop
Commit: 6cd9df7ec9e109bb37f04dc8ec045d8205532059
Parents: 06bcd4e
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Feb 6 21:02:20 2018 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Feb 6 21:02:20 2018 +0100
----------------------------------------------------------------------
cmake/cmake_celix/BundlePackaging.cmake | 7 +++++--
remote_services/remote_service_admin_dfi/CMakeLists.txt | 1 +
2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/6cd9df7e/cmake/cmake_celix/BundlePackaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/BundlePackaging.cmake b/cmake/cmake_celix/BundlePackaging.cmake
index bacdde4..bf39a64 100644
--- a/cmake/cmake_celix/BundlePackaging.cmake
+++ b/cmake/cmake_celix/BundlePackaging.cmake
@@ -326,6 +326,7 @@ function(celix_bundle_libs)
get_target_property(DEPS ${BUNDLE} "BUNDLE_DEPEND_TARGETS")
foreach(LIB IN ITEMS ${ARGN})
+ string(MAKE_C_IDENTIFIER ${LIB} LIBID)
if(IS_ABSOLUTE ${LIB} AND EXISTS ${LIB})
get_filename_component(LIB_NAME ${LIB} NAME)
set(OUT "${BUNDLE_DIR}/${LIB_NAME}")
@@ -336,11 +337,11 @@ function(celix_bundle_libs)
list(APPEND LIBS ${LIB_NAME})
endif()
list(APPEND DEPS ${OUT})
- else()
+ elseif (TARGET ${LIB})
#Assuming target
#NOTE add_custom_command does not support generator expression in OUTPUT value (e.g. $<TARGET_FILE:${LIB}>)
#Using a two step approach to be able to use add_custom_command instead of add_custom_target
- set(OUT "${BUNDLE_GEN_DIR}/lib-${LIB}-copy-timestamp")
+ set(OUT "${BUNDLE_GEN_DIR}/lib-${LIBID}-copy-timestamp")
add_custom_command(OUTPUT ${OUT}
COMMAND ${CMAKE_COMMAND} -E touch ${OUT}
COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:${LIB}>" "${BUNDLE_DIR}/$<TARGET_SONAME_FILE_NAME:${LIB}>"
@@ -350,6 +351,8 @@ function(celix_bundle_libs)
list(APPEND LIBS "$<TARGET_SONAME_FILE_NAME:${LIB}>")
endif()
list(APPEND DEPS "${OUT}") #NOTE depending on ${OUT} not on $<TARGET_FILE:${LIB}>.
+ else()
+ message(FATAL_ERROR "Unexpected library argument '${LIB}'. Expected a absolute path to a library or a cmake library target")
endif()
get_target_property(IS_LIB ${BUNDLE} "BUNDLE_TARGET_IS_LIB")
http://git-wip-us.apache.org/repos/asf/celix/blob/6cd9df7e/remote_services/remote_service_admin_dfi/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/CMakeLists.txt b/remote_services/remote_service_admin_dfi/CMakeLists.txt
index 5870d71..dcc25f7 100644
--- a/remote_services/remote_service_admin_dfi/CMakeLists.txt
+++ b/remote_services/remote_service_admin_dfi/CMakeLists.txt
@@ -35,6 +35,7 @@ if (RSA_REMOTE_SERVICE_ADMIN_DFI)
src/dfi_utils.c
$<TARGET_OBJECTS:Celix::civetweb>
)
+ celix_bundle_private_libs(rsa_dfi Celix::dfi)
target_include_directories(rsa_dfi PRIVATE src $<TARGET_PROPERTY:Celix::civetweb,INCLUDE_DIRECTORIES>)
target_include_directories(rsa_dfi SYSTEM PRIVATE ${CURL_INCLUDE_DIRS} ${JANSSON_INCLUDE_DIRS})
target_link_libraries(rsa_dfi PRIVATE