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>2018-10-15 18:22:47 +0200
commit1fe0d2135d294c6248cd52d875ada8461e3f9749 (patch)
tree9de26dad302484e8bb982088ff8bd4774f033826
parent40352f782c426f382ade48ebe46dd6794b02492f (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 6873a48..353e1ec 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})