From 8ba3cddfd0f79b95adad93da5beff7f5c5ea49f9 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Tue, 16 Jun 2020 18:34:34 -0400 Subject: [PATCH] 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 Change-Id: I4cd6930835f8363ff4e7152a3537772735559a06 --- CMakeLists.txt | 10 ++++++++-- 1 file 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) -- 2.16.6