summaryrefslogtreecommitdiffstats
path: root/reference/etc/macros.cmake
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-05 00:21:16 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-05-05 00:21:16 +0200
commitce3f41af229012f093f5301294f828b52fdbed70 (patch)
treec455e98c26ffef67f7600e6a3684ae8cf5b14e76 /reference/etc/macros.cmake
parent2d5f16ac2a87b8a9e525e55d9a93aee047e0b141 (diff)
Change PREFIX test logic for binding using REGEX.
Change-Id: I42dbc6d0830073cdc0dee8a24e2f482bca1119a5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'reference/etc/macros.cmake')
-rw-r--r--reference/etc/macros.cmake14
1 files changed, 8 insertions, 6 deletions
diff --git a/reference/etc/macros.cmake b/reference/etc/macros.cmake
index af5e542..5a85b86 100644
--- a/reference/etc/macros.cmake
+++ b/reference/etc/macros.cmake
@@ -55,12 +55,6 @@ macro(project_targets_populate)
get_target_property(BD ${TARGET} BINARY_DIR)
get_target_property(OUT ${TARGET} OUTPUT_NAME)
- if(${P} STREQUAL "P-NOTFOUND" AND ${T} STREQUAL "BINDING")
- set(P "lib")
- elseif(${P} STREQUAL "P-NOTFOUND")
- set(P "")
- endif(${P} STREQUAL "P-NOTFOUND" AND ${T} STREQUAL "BINDING")
-
if(${T} STREQUAL "BINDING")
add_custom_command(OUTPUT ${WIDGET_LIBDIR}/${P}${TARGET}.so
DEPENDS ${TARGET}
@@ -79,6 +73,14 @@ macro(project_targets_populate)
add_custom_command(OUTPUT ${WIDGET_HTTPDIR}
DEPENDS ${TARGET}
COMMAND cp -r ${BD}/${P}${OUT} ${WIDGET_HTTPDIR}
+ if(P MATCHES "NOTFOUND$")
+ if (${T} STREQUAL "BINDING")
+ set(P "lib")
+ else()
+ set(P "")
+ endif()
+ endif()
+
)
add_custom_target(${POPULE_WIDGET_TARGET} ALL DEPENDS ${WIDGET_HTTPDIR})
elseif(${T} STREQUAL "DATA")