summaryrefslogtreecommitdiffstats
path: root/cmake/cmake.d
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-08-30 11:14:52 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-08-30 11:14:52 +0200
commit37d062dd381e1c35014e1c4209eb05a734608aa4 (patch)
tree3202becbbd9daf50c1dbb26f95ac7a8a9e20e996 /cmake/cmake.d
parentb5fb4364e02d4d3db339e966c69cbe1177f4f525 (diff)
Added populate binding config files
Change-Id: I9fd0ccd917c0fbbfe67910a169001c85220a78c0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/cmake.d')
-rw-r--r--cmake/cmake.d/03-macros.cmake16
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}")