summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2020-06-16 18:34:34 -0400
committerScott Murray <scott.murray@konsulko.com>2020-06-16 18:38:00 -0400
commit8ba3cddfd0f79b95adad93da5beff7f5c5ea49f9 (patch)
tree47711a75c0f0366a21aa0237861b0114b57ef11b /CMakeLists.txt
parentfe213b176da46375b7ac22cf20defebf40bc896b (diff)
Fix debug widget packaging
Add some logic to add "-debug" in the name of the debug widget file to match the behavior of widget builds that use the cmake app template. Bug-AGL: SPEC-2049, SPEC-3300 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I4cd6930835f8363ff4e7152a3537772735559a06
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d18172d..9b8ff97 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,6 +47,12 @@ install (TARGETS yelp-client DESTINATION bin)
# AGL binding
configure_file(config.xml.in config.xml)
+if("${CMAKE_BUILD_TYPE}" MATCHES "[Dd][Ee][Bb][Uu][Gg]")
+ set (WGT_SUFFIX "-debug")
+else()
+ set (WGT_SUFFIX "")
+endif()
+
add_custom_command(
OUTPUT poi.wgt
DEPENDS yelp-client
@@ -55,7 +61,7 @@ add_custom_command(
COMMAND cp config.xml package/root/
COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/HMI_AppLauncher_POI_Active-01.png package/root/icon.png
COMMAND cp yelp-client package/root/poi
- COMMAND wgtpkg-pack -f -o package/poi.wgt package/root
- COMMAND cp package/poi.wgt .
+ COMMAND wgtpkg-pack -f -o package/poi${WGT_SUFFIX}.wgt package/root
+ COMMAND cp package/poi${WGT_SUFFIX}.wgt .
)
add_custom_target(widget ALL DEPENDS poi.wgt)