summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-08-30 11:14:52 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-10-15 18:22:47 +0200
commit84bffc3074d78452856f75f6095b54e95abcc4a3 (patch)
tree4b0e642c0e0e06ec31900a8a2bd1d72eaf4cc93f
parent6a2f77212ca6d9809f4225ccf80147c56fb16c6e (diff)
Added populate binding config files
Change-Id: I9fd0ccd917c0fbbfe67910a169001c85220a78c0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-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}")