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 2020/02/06 19:53:38 UTC

[celix] 01/03: Fixes an issues when zip command is used instead of jar

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

pnoltes pushed a commit to branch feature/uninstall_bundle_issue
in repository https://gitbox.apache.org/repos/asf/celix.git

commit a821071ad11e2141a827b6fb6f999a72158ed584
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Thu Feb 6 20:47:17 2020 +0100

    Fixes an issues when zip command is used instead of jar
---
 cmake/cmake_celix/BundlePackaging.cmake | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/cmake/cmake_celix/BundlePackaging.cmake b/cmake/cmake_celix/BundlePackaging.cmake
index f0f81b8..fe477be 100644
--- a/cmake/cmake_celix/BundlePackaging.cmake
+++ b/cmake/cmake_celix/BundlePackaging.cmake
@@ -257,12 +257,15 @@ function(add_celix_bundle)
             WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
         )
     elseif(ZIP_COMMAND)
-        add_custom_command(OUTPUT ${BUNDLE_FILE}
+        add_custom_command(OUTPUT ${BUNDLE_CONTENT_DIR}
             COMMAND ${CMAKE_COMMAND} -E make_directory ${BUNDLE_CONTENT_DIR}
+        )
+
+        add_custom_command(OUTPUT ${BUNDLE_FILE}
             COMMAND ${CMAKE_COMMAND} -E copy_if_different ${BUNDLE_GEN_DIR}/MANIFEST.MF META-INF/MANIFEST.MF
             COMMAND ${ZIP_COMMAND} -rq ${BUNDLE_FILE} *
             COMMENT "Packaging ${BUNDLE_TARGET_NAME}"
-            DEPENDS  ${BUNDLE_TARGET_NAME} "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DEPEND_TARGETS>" ${BUNDLE_GEN_DIR}/MANIFEST.MF
+            DEPENDS ${BUNDLE_CONTENT_DIR} ${BUNDLE_TARGET_NAME} "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DEPEND_TARGETS>" ${BUNDLE_GEN_DIR}/MANIFEST.MF
             WORKING_DIRECTORY ${BUNDLE_CONTENT_DIR}
         )
     else()