diff options
author | wsnipex <wsnipex@a1.net> | 2013-08-20 16:27:43 +0200 |
---|---|---|
committer | spiff <spiff@xbmc.org> | 2013-08-20 20:20:23 +0200 |
commit | 4fe9fa437c78c50e6dd663aa255d4c0b611caab8 (patch) | |
tree | a9568f7d2b5e23ea43816c09bf6c588ad66ea145 /project/cmake | |
parent | e031438a98f234251ea5d4192ee58d9d4973d015 (diff) |
[cmake] fix tgz package and set zip as default cpack_generator
Diffstat (limited to 'project/cmake')
-rw-r--r-- | project/cmake/xbmc-addon-helpers.cmake | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/project/cmake/xbmc-addon-helpers.cmake b/project/cmake/xbmc-addon-helpers.cmake index 0e64f057e6..7a53918732 100644 --- a/project/cmake/xbmc-addon-helpers.cmake +++ b/project/cmake/xbmc-addon-helpers.cmake @@ -9,9 +9,9 @@ add_custom_target(addon-package COMMAND cmake --build ${CMAKE_BINARY_DIR} --target package) -macro(add_cpack_workaround target version) +macro(add_cpack_workaround target version ext) add_custom_command(TARGET addon-package PRE_BUILD - COMMAND cmake -E rename addon-${target}-${version}.zip ${target}-${version}.zip) + COMMAND cmake -E rename addon-${target}-${version}.${ext} ${target}-${version}.${ext}) endmacro() # Grab the version from a given add-on's addon.xml @@ -34,12 +34,13 @@ macro (build_addon target prefix libs) SET_TARGET_PROPERTIES(${target} PROPERTIES PREFIX "lib") ENDIF(OS STREQUAL "android") + # set zip as default if addon-package is called without PACKAGE_XXX + SET(CPACK_GENERATOR "ZIP") + SET(ext "zip") IF(PACKAGE_ZIP OR PACKAGE_TGZ) - IF(PACKAGE_ZIP) - SET(CPACK_GENERATOR "ZIP") - ENDIF(PACKAGE_ZIP) IF(PACKAGE_TGZ) SET(CPACK_GENERATOR "TGZ") + SET(ext "tar.gz") ENDIF(PACKAGE_TGZ) SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF) set(CPACK_PACKAGE_FILE_NAME addon) @@ -59,7 +60,7 @@ macro (build_addon target prefix libs) INSTALL(TARGETS ${target} DESTINATION ${target} COMPONENT ${target}-${${prefix}_VERSION}) ENDIF(WIN32) - add_cpack_workaround(${target} ${${prefix}_VERSION}) + add_cpack_workaround(${target} ${${prefix}_VERSION} ${ext}) ELSE(PACKAGE_ZIP OR PACKAGE_TGZ) INSTALL(TARGETS ${target} DESTINATION lib/xbmc/addons/${target}) INSTALL(DIRECTORY ${target} DESTINATION share/xbmc/addons) |