From 84bffc3074d78452856f75f6095b54e95abcc4a3 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Wed, 30 Aug 2017 11:14:52 +0200 Subject: Added populate binding config files Change-Id: I9fd0ccd917c0fbbfe67910a169001c85220a78c0 Signed-off-by: Romain Forlot --- cmake/cmake.d/03-macros.cmake | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'cmake') 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}") -- cgit 1.2.3-korg