diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-08-30 11:14:52 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-08-30 11:14:52 +0200 |
commit | 37d062dd381e1c35014e1c4209eb05a734608aa4 (patch) | |
tree | 3202becbbd9daf50c1dbb26f95ac7a8a9e20e996 /cmake/cmake.d/03-macros.cmake | |
parent | b5fb4364e02d4d3db339e966c69cbe1177f4f525 (diff) |
Added populate binding config files
Change-Id: I9fd0ccd917c0fbbfe67910a169001c85220a78c0
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 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cmake/cmake.d/03-macros.cmake b/cmake/cmake.d/03-macros.cmake index cb830d1..6e807c9 100644 --- a/cmake/cmake.d/03-macros.cmake +++ b/cmake/cmake.d/03-macros.cmake @@ -299,6 +299,22 @@ macro(project_targets_populate) ) add_dependencies(populate ${POPULE_PACKAGE_TARGET}) add_dependencies(${POPULE_PACKAGE_TARGET} ${TARGET}) + elseif(${T} STREQUAL "BINDING-CONFIG") + # Generate list of output files instead of just one output directory + get_target_property(SF ${TARGET} SOURCES) + foreach(file ${SF}) + get_filename_component(JUST_FILENAME ${file} NAME) + list(APPEND OUTPUT_FILES ${PACKAGE_ETCDIR}/${JUST_FILENAME}) + endforeach() + add_custom_target(${POPULE_PACKAGE_TARGET}) + add_custom_command(TARGET ${POPULE_PACKAGE_TARGET} + POST_BUILD + COMMAND mkdir -p ${PACKAGE_ETCDIR} + COMMAND touch ${PACKAGE_ETCDIR} + COMMAND cp -r ${BD}/${TARGET} ${PACKAGE_ETCDIR} + ) + add_dependencies(populate ${POPULE_PACKAGE_TARGET}) + add_dependencies(${POPULE_PACKAGE_TARGET} ${TARGET}) endif(${T} STREQUAL "BINDING") elseif(${CMAKE_BUILD_TYPE} MATCHES "[Dd][Ee][Bb][Uu][Gg]") MESSAGE("${Yellow}.. Warning: ${TARGET} ignored when packaging.${ColourReset}") |