diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-07-03 17:35:17 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-07-04 12:43:12 +0200 |
commit | 22a2cbfd2e36653c9de3b8a7a63e5f50f223419c (patch) | |
tree | c05aab2c0733673141ed496839acd5acbbd8a733 /cmake/cmake.d/03-macros.cmake | |
parent | aa68dbd12c60f9eb0015a508a22d8650914f8e5e (diff) |
Clearer coverage compilation options configuration
Rename CCOV to COVERAGE to make it more clearer which compilation profile
use and add a suffix to the built widget name except for
the RELEASE built type which output the normal name.
Change-Id: Ied0dfb47c25402c4146ebb190d65d17cff9ec360
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/cmake.d/03-macros.cmake')
-rw-r--r-- | cmake/cmake.d/03-macros.cmake | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/cmake/cmake.d/03-macros.cmake b/cmake/cmake.d/03-macros.cmake index 71f2964..710682c 100644 --- a/cmake/cmake.d/03-macros.cmake +++ b/cmake/cmake.d/03-macros.cmake @@ -440,6 +440,10 @@ macro(wgt_package_build) set(WIDGET_ENTRY_POINT lib) endif() + if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "RELEASE") + string(TOLOWER "${PROJECT_NAME}-${CMAKE_BUILD_TYPE}" WGT_NAME) + endif() + add_custom_command(OUTPUT ${PROJECT_PKG_BUILD_DIR}/config.xml COMMAND ${CMAKE_COMMAND} -DINFILE=${WIDGET_CONFIG_TEMPLATE} -DOUTFILE=${PROJECT_PKG_BUILD_DIR}/config.xml -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake COMMAND cp ${ICON_PATH} ${PROJECT_PKG_BUILD_DIR}/${PROJECT_ICON} @@ -455,22 +459,19 @@ macro(wgt_package_build) find_program(wgtpkgCMD "wgtpkg-pack") if(wgtpkgCMD) - message(STATUS "------ Create widget using WGTPKG") - set(packCMD ${wgtpkgCMD} "-f" "-o" "${PROJECT_NAME}.wgt" ${PROJECT_PKG_BUILD_DIR}) + set(packCMD ${wgtpkgCMD} "-f" "-o" "${WGT_NAME}.wgt" ${PROJECT_PKG_BUILD_DIR}) else() - message(STATUS "----- Create widget using ZIP") - - set(packCMD cd ${PROJECT_PKG_BUILD_DIR} && ${CMAKE_COMMAND} "-E" "tar" "cf" "../${PROJECT_NAME}.wgt" "--format=zip" "*") + set(packCMD cd ${PROJECT_PKG_BUILD_DIR} && ${CMAKE_COMMAND} "-E" "tar" "cf" "../${WGT_NAME}.wgt" "--format=zip" "*") endif() - add_custom_command(OUTPUT ${PROJECT_NAME}.wgt + add_custom_command(OUTPUT ${WGT_NAME}.wgt DEPENDS ${PROJECT_TARGETS} COMMAND ${packCMD} ) - add_custom_target(widget DEPENDS ${PROJECT_NAME}.wgt) + add_custom_target(widget DEPENDS ${WGT_NAME}.wgt) add_dependencies(widget populate packaging_wgt) - set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.wgt") + set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/${WGT_NAME}.wgt") if(NOT RSYNC_TARGET) message ("${Yellow}.. Warning: RSYNC_TARGET not defined 'make widget-target-install' not instanciated${ColourReset}") |