Making default no compression
set(CELIX_NO_POSTFIX_BUILD_TYPES RelWithDebInfo Release CACHE STRING "The build type used for creating bundle without a build type postfix.")
+set(CELIX_DEFAULT_JAR_COMMAND_ARGUMENTS -cfm0 CACHE STRING "Default no compression is applied")
+set(CELIX_DEFAULT_ZIP_COMMAND_ARGUMENTS -rq0 CACHE STRING "Default no compression is applied")
+
find_program(JAR_COMMAND jar NO_CMAKE_FIND_ROOT_PATH)
@@ -272,7 +275,7 @@ function(add_celix_bundle)
if(JAR_COMMAND)
add_custom_command(OUTPUT ${BUNDLE_FILE}
COMMAND ${CMAKE_COMMAND} -E make_directory ${BUNDLE_CONTENT_DIR}
- COMMAND ${JAR_COMMAND} -cfm ${BUNDLE_FILE} ${BUNDLE_GEN_DIR}/MANIFEST.MF -C ${BUNDLE_CONTENT_DIR} .
+ COMMAND ${JAR_COMMAND} ${CELIX_DEFAULT_JAR_COMMAND_ARGUMENTS} ${BUNDLE_FILE} ${BUNDLE_GEN_DIR}/MANIFEST.MF -C ${BUNDLE_CONTENT_DIR} .
COMMENT "Packaging ${BUNDLE_TARGET_NAME}"
DEPENDS ${BUNDLE_TARGET_NAME} "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DEPEND_TARGETS>" ${BUNDLE_GEN_DIR}/MANIFEST.MF
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
@@ -282,7 +285,7 @@ function(add_celix_bundle)
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} *
+ COMMAND ${ZIP_COMMAND} ${CELIX_DEFAULT_ZIP_COMMAND_ARGUMENTS} ${BUNDLE_FILE} *
COMMENT "Packaging ${BUNDLE_TARGET_NAME}"
DEPENDS ${BUNDLE_TARGET_NAME} "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DEPEND_TARGETS>" ${BUNDLE_GEN_DIR}/MANIFEST.MF
WORKING_DIRECTORY ${BUNDLE_CONTENT_DIR}
