diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-08-23 12:13:01 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-10-23 20:54:23 +0200 |
commit | 6dddf0f9f5f6769db5b3cc41a5d74c371ff93bf9 (patch) | |
tree | 77e22c760e75dd8b7595670d3b81888ea4f15c77 /cmake/cmake.d/04-extra_targets.cmake | |
parent | 100657a2353329f19b8e7c584db3f418472f9959 (diff) |
Convert app-templates to a cmake module
- Changes PATH to find correctly all cmake files.
- Clean useless code now it's integrated as CMake module
- Clean variable usage
- Create module entry point
Bugs-AGL: SPEC-1682
Change-Id: I6943129677603b786c7144a92880d82795a916cd
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/cmake.d/04-extra_targets.cmake')
-rw-r--r-- | cmake/cmake.d/04-extra_targets.cmake | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmake/cmake.d/04-extra_targets.cmake b/cmake/cmake.d/04-extra_targets.cmake index d1b446c..3b94b8c 100644 --- a/cmake/cmake.d/04-extra_targets.cmake +++ b/cmake/cmake.d/04-extra_targets.cmake @@ -45,12 +45,12 @@ endforeach() # Autobuild target # ---------------------------------------------------------------------------- -add_custom_command(OUTPUT ${PROJECT_TEMPLATE_AGL_AUTOBUILD_DIR}/autobuild ${PROJECT_TEMPLATE_LINUX_AUTOBUILD_DIR}/autobuild - DEPENDS ${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/template.d/autobuild/agl/autobuild.in - ${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/template.d/autobuild/linux/autobuild.in +add_custom_command(OUTPUT ${PROJECT_AGL_AUTOBUILD_DIR}/autobuild ${PROJECT_LINUX_AUTOBUILD_DIR}/autobuild + DEPENDS ${TEMPLATE_DIR}/autobuild/agl/autobuild.in + ${TEMPLATE_DIR}/autobuild/linux/autobuild.in - COMMAND [ ! -f "${PROJECT_TEMPLATE_AGL_AUTOBUILD_DIR}/autobuild" ] && ${CMAKE_COMMAND} -DINFILE=${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/template.d/autobuild/agl/autobuild.in -DOUTFILE=${PROJECT_TEMPLATE_AGL_AUTOBUILD_DIR}/autobuild -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake || exit 0 - COMMAND [ ! -f "${PROJECT_TEMPLATE_LINUX_AUTOBUILD_DIR}/autobuild" ] && ${CMAKE_COMMAND} -DINFILE=${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/template.d/autobuild/agl/autobuild.in -DOUTFILE=${PROJECT_TEMPLATE_LINUX_AUTOBUILD_DIR}/autobuild -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake || exit 0 + COMMAND [ ! -f "${PROJECT_AGL_AUTOBUILD_DIR}/autobuild" ] && ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/autobuild/agl/autobuild.in -DOUTFILE=${PROJECT_AGL_AUTOBUILD_DIR}/autobuild -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake && chmod a+x ${PROJECT_AGL_AUTOBUILD_DIR}/autobuild || exit 0 + COMMAND [ ! -f "${PROJECT_LINUX_AUTOBUILD_DIR}/autobuild" ] && ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/autobuild/agl/autobuild.in -DOUTFILE=${PROJECT_LINUX_AUTOBUILD_DIR}/autobuild -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake && chmod a+x ${PROJECT_LINUX_AUTOBUILD_DIR}/autobuild || exit 0 ) -add_custom_target(autobuild ALL DEPENDS ${PROJECT_TEMPLATE_AGL_AUTOBUILD_DIR}/autobuild ${PROJECT_TEMPLATE_LINUX_AUTOBUILD_DIR}/autobuild) +add_custom_target(autobuild ALL DEPENDS ${PROJECT_AGL_AUTOBUILD_DIR}/autobuild ${PROJECT_LINUX_AUTOBUILD_DIR}/autobuild) |