summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-04 10:57:33 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-05-04 10:58:10 +0200
commit5c6b93ba92f80189dda2c5fad734f4a294a49c29 (patch)
tree85843d04d958fed69f8898d36f25b1e532b0e0e3
parent352a4a3f5ccd54b77e0b7bd46c1894e71c4c3836 (diff)
Use OUTPUT_NAME properties by default to populate to widget tree
As if not set then it will be logical name and if set then it is the good name Change-Id: I424aa9c8d8486350486e9c2b13dc3c9be9ccd5a0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--template/etc/macros.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/template/etc/macros.cmake b/template/etc/macros.cmake
index cdcac2b..6a389de 100644
--- a/template/etc/macros.cmake
+++ b/template/etc/macros.cmake
@@ -69,29 +69,29 @@ macro(populate_widget)
set(POPULE_WIDGET_TARGET "populate_${TARGET_NAME}")
get_target_property(T ${TARGET_NAME} LABELS)
+ get_target_property(OUT ${TARGET_NAME} OUTPUT_NAME)
+
if(${T} STREQUAL "BINDING")
add_custom_command(OUTPUT ${WIDGET_LIBDIR}/${TARGET_NAME}.so
DEPENDS ${TARGET_NAME}
COMMAND mkdir -p ${WIDGET_LIBDIR}
- COMMAND cp ${TARGET_NAME}.so ${WIDGET_LIBDIR}
+ COMMAND cp ${OUT}.so ${WIDGET_LIBDIR}
)
add_custom_target(${POPULE_WIDGET_TARGET} ALL DEPENDS ${WIDGET_LIBDIR}/${TARGET_NAME}.so)
elseif(${T} STREQUAL "EXECUTABLE")
add_custom_command(OUTPUT ${WIDGET_BINDIR}/${TARGET_NAME}
DEPENDS ${TARGET_NAME}
COMMAND mkdir -p ${WIDGET_BINDIR}
- COMMAND cp ${TARGET_NAME} ${WIDGET_BINDIR}
+ COMMAND cp ${OUT} ${WIDGET_BINDIR}
)
add_custom_target(${POPULE_WIDGET_TARGET} ALL DEPENDS ${WIDGET_BINDIR}/${TARGET_NAME})
elseif(${T} STREQUAL "HTDOCS")
- get_target_property(OUT ${TARGET_NAME} OUTPUT_NAME)
add_custom_command(OUTPUT ${WIDGET_HTTPDIR}
DEPENDS ${TARGET_NAME}
COMMAND cp -r ${OUT} ${WIDGET_HTTPDIR}
)
add_custom_target(${POPULE_WIDGET_TARGET} ALL DEPENDS ${WIDGET_HTTPDIR})
elseif(${T} STREQUAL "DATA")
- get_target_property(OUT ${TARGET_NAME} OUTPUT_NAME)
add_custom_command(OUTPUT ${WIDGET_DATADIR}
DEPENDS ${TARGET_NAME}
COMMAND cp -r ${OUT} ${WIDGET_DATADIR}