summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-12 12:50:34 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-06-12 12:50:48 +0200
commit21ae95d8eb61745ca54fd143e25dba065a817f6a (patch)
treec5817f2450a05084652a99dc655046f725c1398f
parent4809e4205dd764c09f3d3a48d2b6ca5f2ac3de01 (diff)
Fix:WIDGET_ENTRY_POINT variable always overwritten
Change-Id: I429676174add205d60b9cd0d03f091f2533a5182 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--cmake/common.cmake10
1 files changed, 6 insertions, 4 deletions
diff --git a/cmake/common.cmake b/cmake/common.cmake
index 5b030d4..461ea17 100644
--- a/cmake/common.cmake
+++ b/cmake/common.cmake
@@ -187,11 +187,13 @@ macro(wgt_package_build)
if(NOT EXISTS ${WGT_TEMPLATE_DIR}/icon-default.png)
MESSAGE(FATAL_ERROR "${Red}WARNING ! Missing mandatory files to build widget file.\nYou need ${PROJECT_ICON} file in ${WGT_TEMPLATE_DIR} folder.${ColourReset}")
endif()
- if(NOT WIDGET_TYPE)
- MESSAGE(FATAL_ERROR "WIDGET_TYPE must be set in your config.cmake.\neg.: set(WIDGET_TYPE application/vnd.agl.service)")
- endif()
+ if(NOT WIDGET_TYPE)
+ MESSAGE(FATAL_ERROR "WIDGET_TYPE must be set in your config.cmake.\neg.: set(WIDGET_TYPE application/vnd.agl.service)")
+ endif()
- set(WIDGET_ENTRY_POINT lib CACHE STRING "the widget entry point file")
+ if(NOT WIDGET_ENTRY_POINT)
+ set(WIDGET_ENTRY_POINT lib)
+ endif()
configure_file(${WIDGET_CONFIG_TEMPLATE} ${PROJECT_PKG_BUILD_DIR}/config.xml)
file(COPY ${WGT_TEMPLATE_DIR}/icon-default.png DESTINATION ${PROJECT_PKG_BUILD_DIR})