diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-08-10 18:25:48 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-08-16 18:40:34 +0200 |
commit | e1ef035594fc80baaf5cd571ab4d04023309a906 (patch) | |
tree | d72dd196318c583d28e6a8a3755251c79ba16bf3 /cmake/cmake.d/02-macros.cmake | |
parent | 20c82ee40b442e5b64079155e2eafaf22440d1fb (diff) |
Extending pluggable arch for templates
Idea is to be able to use custom templates from home dir and system dir
Change-Id: I74b48458f3dcc26b49f8144e042c213691028167
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/cmake.d/02-macros.cmake')
-rw-r--r-- | cmake/cmake.d/02-macros.cmake | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cmake/cmake.d/02-macros.cmake b/cmake/cmake.d/02-macros.cmake index e116d2e..3787817 100644 --- a/cmake/cmake.d/02-macros.cmake +++ b/cmake/cmake.d/02-macros.cmake @@ -185,8 +185,8 @@ macro(remote_targets_populate) endif() endif() - configure_files_in_dir(${SSH_TEMPLATE_DIR}) - configure_files_in_dir(${GDB_TEMPLATE_DIR}) + configure_files_in_dir(${TEMPLATE_DIR}) + configure_files_in_dir(${TEMPLATE_DIR}) add_custom_target(remote-target-populate COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/target/*.sh @@ -201,8 +201,8 @@ macro(wgt_package_build) if(NOT EXISTS ${WIDGET_CONFIG_TEMPLATE}) MESSAGE(FATAL_ERROR "${Red}WARNING ! Missing mandatory files to build widget file.\nYou need a config.xml template: please specify WIDGET_CONFIG_TEMPLATE correctly.${ColourReset}") endif() - if(NOT EXISTS ${WGT_TEMPLATE_DIR}/icon-default.png) - MESSAGE(FATAL_ERROR "${Red}WARNING ! Missing mandatory files to build widget file.\nYou need ${PROJECT_ICON} file in ${WGT_TEMPLATE_DIR} folder.${ColourReset}") + if(NOT EXISTS ${TEMPLATE_DIR}/icon-default.png) + MESSAGE(FATAL_ERROR "${Red}WARNING ! Missing mandatory files to build widget file.\nYou need ${PROJECT_ICON} file in ${TEMPLATE_DIR} folder.${ColourReset}") endif() if(NOT WIDGET_TYPE) MESSAGE(FATAL_ERROR "WIDGET_TYPE must be set in your config.cmake.\neg.: set(WIDGET_TYPE application/vnd.agl.service)") @@ -214,15 +214,15 @@ macro(wgt_package_build) 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 ${WGT_TEMPLATE_DIR}/icon-default.png ${PROJECT_PKG_BUILD_DIR}/${PROJECT_ICON} + COMMAND cp ${TEMPLATE_DIR}/icon-default.png ${PROJECT_PKG_BUILD_DIR}/${PROJECT_ICON} ) add_custom_target(packaging_wgt DEPENDS ${PROJECT_PKG_BUILD_DIR}/config.xml) # Fulup ??? copy any extra file in wgt/etc into populate package before building the widget - file(GLOB PROJECT_CONF_FILES "${WGT_TEMPLATE_DIR}/etc/*") + file(GLOB PROJECT_CONF_FILES "${TEMPLATE_DIR}/etc/*") if(${PROJECT_CONF_FILES}) - file(COPY "${WGT_TEMPLATE_DIR}/etc/*" DESTINATION ${PROJECT_PKG_BUILD_DIR}/etc/) + file(COPY "${TEMPLATE_DIR}/etc/*" DESTINATION ${PROJECT_PKG_BUILD_DIR}/etc/) endif(${PROJECT_CONF_FILES}) add_custom_command(OUTPUT ${PROJECT_NAME}.wgt @@ -241,7 +241,7 @@ macro(wgt_package_build) COMMAND exit -1 ) else() - configure_files_in_dir(${WGT_TEMPLATE_DIR}) + configure_files_in_dir(${TEMPLATE_DIR}) add_custom_target(widget-target-install DEPENDS widget COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/target/install-wgt-on-${RSYNC_TARGET}.sh @@ -279,15 +279,15 @@ macro(deb_package_build) endmacro(deb_package_build) macro(project_package_build) - if(EXISTS ${RPM_TEMPLATE_DIR}) + if(EXISTS ${TEMPLATE_DIR}) rpm_package_build() endif() - if(EXISTS ${WGT_TEMPLATE_DIR}) + if(EXISTS ${TEMPLATE_DIR}) wgt_package_build() endif() - if(EXISTS ${DEB_TEMPLATE_DIR}) + if(EXISTS ${TEMPLATE_DIR}) deb_package_build() endif() endmacro(project_package_build) |