celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [2/2] celix git commit: CELIX-335: Fix for wrong dependency setup for deploy targets
Date Mon, 11 Jan 2016 19:21:15 GMT
CELIX-335: Fix for wrong dependency setup for deploy targets


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/40bf1930
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/40bf1930
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/40bf1930

Branch: refs/heads/feature/CELIX-335_deploy_refactoring
Commit: 40bf19301a62d032c047d7c2a70046a5e8fd2d50
Parents: 9c7892b
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Mon Jan 11 20:21:15 2016 +0100
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Mon Jan 11 20:21:15 2016 +0100

----------------------------------------------------------------------
 cmake/cmake_celix/Packaging.cmake | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/40bf1930/cmake/cmake_celix/Packaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Packaging.cmake b/cmake/cmake_celix/Packaging.cmake
index 48b8eec..022f5a2 100644
--- a/cmake/cmake_celix/Packaging.cmake
+++ b/cmake/cmake_celix/Packaging.cmake
@@ -538,19 +538,25 @@ function(deploy_bundles_dir)
     get_target_property(DEPS ${DEPLOY_NAME} "DEPLOY_TARGET_DEPS")
 
     foreach(BUNDLE IN ITEMS ${BD_BUNDLES})
-        set(OUT "${DEPLOY_LOC}/${BD_DIR_NAME}/${BUNDLE}.zip")
-        list(APPEND DEPS "${OUT}")
-
         if (IS_ABSOLUTE ${BUNDLE} AND EXISTS ${BUNDLE})
+            get_filename_component(BUNDLE_FILENAME ${BUNDLE} NAME) 
+            set(OUT "${DEPLOY_LOC}/${BD_DIR_NAME}/${BUNDLE_FILENAME}.zip")
             add_custom_command(OUTPUT ${OUT}
                 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${BUNDLE} ${OUT}
+                COMMENT "Copying bundle '${BUNDLE}' to '${DEPLOY_LOC}/${BD_DIR_NAME}'"
+                DEPENDS ${BUNDLE}
             )
         else()
+            set(OUT "${DEPLOY_LOC}/${BD_DIR_NAME}/${BUNDLE}.zip")
             add_custom_command(OUTPUT ${OUT}
                 COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_PROPERTY:${BUNDLE},BUNDLE_FILE>"
${OUT}
-                DEPENDS ${BUNDLE}_bundle
+                COMMENT "Copying bundle '${BUNDLE}' to '${DEPLOY_LOC}/${BD_DIR_NAME}'"
+                DEPENDS ${BUNDLE} #Note cannot directly depends on ${BUNDLE}_bundle, depending
in ${BUNDLE} triggering build instead. 
             )
+            add_dependencies(${DEPLOY_NAME} ${BUNDLE}_bundle) #ensure the the deploy depends
on the _bundle target, custom_command depends on add_library
         endif()
+        list(APPEND DEPS "${OUT}")
+
     endforeach()
 
     set_target_properties(${DEPLOY_NAME} PROPERTIES "DEPLOY_TARGET_DEPS" "${DEPS}")


Mime
View raw message