From 08f6a2af804fc7a7cfe8656a8dff00c245db6c15 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Wed, 28 Jun 2017 09:49:50 +0200 Subject: templated autobuild script generation. Change-Id: Ie7e411f30a30e073570c546aeec6ee05972f8e2a Signed-off-by: Romain Forlot --- cmake/cmake.d/03-extra_targets.cmake | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'cmake/cmake.d/03-extra_targets.cmake') diff --git a/cmake/cmake.d/03-extra_targets.cmake b/cmake/cmake.d/03-extra_targets.cmake index d08c842..209cb57 100644 --- a/cmake/cmake.d/03-extra_targets.cmake +++ b/cmake/cmake.d/03-extra_targets.cmake @@ -112,12 +112,18 @@ if(OSRELEASE MATCHES "debian") ${PACKAGING_DEB_OUTPUT_COMPAT} ${PACKAGING_DEB_OUTPUT_CONTROL} ${PACKAGING_DEB_OUTPUT_RULES} - COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/debian.compat.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_COMPAT} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake - COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/debian.changelog.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_CHANGELOG} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake - COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/deb-config.dsc.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_DSC} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake - COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/deb-config.install.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_INSTALL} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake - COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/debian.control.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_CONTROL} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake - COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/debian.rules.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_RULES} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/debian.compat.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_COMPAT} \ + -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/debian.changelog.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_CHANGELOG} \ + -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/deb-config.dsc.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_DSC} \ + -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/deb-config.install.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_INSTALL} \ + -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/debian.control.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_CONTROL} \ + -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/debian.rules.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_RULES} \ + -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake ) add_custom_target(packaging_deb DEPENDS ${PACKAGING_DEB_OUTPUT_DSC} ${PACKAGING_DEB_OUTPUT_INSTALL} @@ -162,6 +168,10 @@ endforeach() add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/conf.d/autobuild/agl/autobuild ${CMAKE_SOURCE_DIR}/conf.d/autobuild/linux/autobuild + COMMAND ${CMAKE_COMMAND} -DINFILE=${PROJECT_APP_TEMPLATES_DIR}/autobuild/agl/autobuild.in -DOUTFILE=${CMAKE_SOURCE_DIR}/conf.d/autobuild/agl/autobuild \ + -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + COMMAND ${CMAKE_COMMAND} -DINFILE=${PROJECT_APP_TEMPLATES_DIR}/autobuild/agl/autobuild.in -DOUTFILE=${CMAKE_SOURCE_DIR}/conf.d/autobuild/linux/autobuild \ + -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake COMMAND rsync -azp ${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/autobuild ${CMAKE_SOURCE_DIR}/conf.d ) -- cgit 1.2.3-korg