From 8d64f84defc32d3ffc4c067acb0e1f05e0078988 Mon Sep 17 00:00:00 2001 From: Victor Tran Date: Tue, 25 Jul 2023 15:01:48 +1000 Subject: [PATCH 1/8] Partial winappx support --- lib/cmake-scripts/cntp-targetname.cmake | 3 ++- lib/cmake-scripts/cntp-winappx.cmake | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 lib/cmake-scripts/cntp-winappx.cmake diff --git a/lib/cmake-scripts/cntp-targetname.cmake b/lib/cmake-scripts/cntp-targetname.cmake index 3d634a17..90344eb9 100644 --- a/lib/cmake-scripts/cntp-targetname.cmake +++ b/lib/cmake-scripts/cntp-targetname.cmake @@ -21,7 +21,8 @@ function(cntp_target_name targetName targetReadableName) set_target_properties(${targetName} PROPERTIES - OUTPUT_NAME "${TARGET_FINAL_NAME}") + OUTPUT_NAME "${TARGET_FINAL_NAME}" + READABLE_NAME "${TARGET_READABLE_NAME}") target_compile_definitions(${targetName} PRIVATE T_APPMETA_READABLE_NAME="${TARGET_READABLE_NAME}") endfunction() diff --git a/lib/cmake-scripts/cntp-winappx.cmake b/lib/cmake-scripts/cntp-winappx.cmake new file mode 100644 index 00000000..6d221cd1 --- /dev/null +++ b/lib/cmake-scripts/cntp-winappx.cmake @@ -0,0 +1,10 @@ +include_guard() + +function(cntp_winappx target appxmanifest) + get_target_property(APPX_DISPLAY_NAME ${target} READABLE_NAME) + get_target_property(APPX_EXECUTABLE_NAME ${target} OUTPUT_NAME) + + set(APPX_EXECUTABLE_NAME ${APPX_EXECUTABLE_NAME}.exe) + set(APPX_ARCH x64) # TODO: Update + configure_file(${appxmanifest} appxmanifest.xml) +endfunction() From bce00d48ec5b2c0096cd156899d049fc496e7ba2 Mon Sep 17 00:00:00 2001 From: Victor Tran Date: Tue, 25 Jul 2023 16:24:28 +1000 Subject: [PATCH 2/8] More appx changes --- cntp-appicontool/main.cpp | 27 +++++++++++++++++++++++++++ cntp-windeploy/main.cpp | 15 +++++++++++++++ lib/cmake-scripts/cntp-appicon.cmake | 3 ++- 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/cntp-appicontool/main.cpp b/cntp-appicontool/main.cpp index 31b7d99d..8f43e859 100644 --- a/cntp-appicontool/main.cpp +++ b/cntp-appicontool/main.cpp @@ -60,6 +60,10 @@ int main(int argc, char* argv[]) { {"r", "output-rc"}, "Qt Resource output file", "rc-output" }); + parser.addOption({ + {"p", "output-png"}, + "PNG output file", "png-output" + }); parser.addOption({ {"b", "blueprint"}, "Create Blueprint style icon" @@ -175,5 +179,28 @@ int main(int argc, char* argv[]) { rcFile.close(); } + if (parser.isSet("output-png")) { + eoutput << "Creating PNG icon"; + CombinedIcon pngIcon; + pngIcon.setBaseIcon(CombinedIcon::PlatformSpecificIcon); + pngIcon.setIconGradientColors(color1, color2); + pngIcon.setGenerateBlueprintIcon(parser.isSet("blueprint")); + pngIcon.setOverlayIcon(overlayIcon); + pngIcon.setOverlayIconMac(overlayIconMac); + + QSize size(256, 256); + + QImage image(size, QImage::Format_ARGB32); + image.fill(Qt::transparent); + + QPainter imagePainter(&image); + + QSvgRenderer renderer(pngIcon.generatedIcon().toUtf8()); + renderer.render(&imagePainter, QRect(QPoint(0, 0), size)); + imagePainter.end(); + + image.save(parser.value("output-png"), "PNG"); + } + return 0; } diff --git a/cntp-windeploy/main.cpp b/cntp-windeploy/main.cpp index 7fe2951a..9a9459d4 100644 --- a/cntp-windeploy/main.cpp +++ b/cntp-windeploy/main.cpp @@ -1,5 +1,6 @@ #include #include +#include #include "deployfolder.h" #include "common.h" #include "systemlibrarydatabase.h" @@ -14,6 +15,11 @@ int main(int argc, char** argv) { parser.addOption({{"q", "qt-path"}, "Path to Qt installation to use", "qt-path"}); parser.addOption({{"h", "host-qt-path"}, "When deploying a cross-compiled application, path to Host Qt installation", "host-qt-path"}); parser.addOption({{"l", "library-path"}, "Path to search for libraries to deploy (defaults to Program Files)", "library-path"}); + parser.addPositionalArgument("directory", "Directory containing application to prepare for deployment"); + parser.addOption({ + {"a", "appx-output"}, + "APPX bundle output file", "appx-output" + }); QCommandLineOption helpOption = parser.addHelpOption(); parser.parse(a.arguments()); @@ -106,5 +112,14 @@ int main(int argc, char** argv) { output.flush(); deployFolder.makeSelfContained(libraryDatabase); + if (parser.isSet("appx-output")) { + QFile::remove(parser.value("appx-output")); + + QProcess makeappxProcess; + makeappxProcess.setProcessChannelMode(QProcess::ForwardedChannels); + makeappxProcess.start("makeappx", {"pack", "/d", deployFolder.destinationDir().absolutePath(), "/p", parser.value("appx-output")}); + makeappxProcess.waitForFinished(-1); + } + return 0; } diff --git a/lib/cmake-scripts/cntp-appicon.cmake b/lib/cmake-scripts/cntp-appicon.cmake index 41588fff..e95ff891 100644 --- a/lib/cmake-scripts/cntp-appicon.cmake +++ b/lib/cmake-scripts/cntp-appicon.cmake @@ -33,7 +33,8 @@ function(cntp_app_icon targetName) IF(${CMAKE_SYSTEM_NAME} MATCHES "Windows") list(APPEND ICONTOOL_ARGS - -n ${CMAKE_CURRENT_BINARY_DIR}/native.ico) + -n ${CMAKE_CURRENT_BINARY_DIR}/native.ico + -p ${CMAKE_CURRENT_BINARY_DIR}/appxicon.png) list(APPEND ICONTOOL_OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/native.ico) From d5b122e751b54156c8d3491295726e2c6008af81 Mon Sep 17 00:00:00 2001 From: Victor Tran Date: Tue, 25 Jul 2023 18:06:43 +1000 Subject: [PATCH 3/8] Automatic version information from tag --- lib/cmake-scripts/cntp-repoversion.cmake | 47 ++++++++++++++++++++++++ lib/cmake-scripts/cntp-winappx.cmake | 3 ++ 2 files changed, 50 insertions(+) create mode 100644 lib/cmake-scripts/cntp-repoversion.cmake diff --git a/lib/cmake-scripts/cntp-repoversion.cmake b/lib/cmake-scripts/cntp-repoversion.cmake new file mode 100644 index 00000000..d7a5e59b --- /dev/null +++ b/lib/cmake-scripts/cntp-repoversion.cmake @@ -0,0 +1,47 @@ +include_guard() + +function(cntp_repoversion outvar) + set(${outvar}_MAJOR 0 PARENT_SCOPE) + set(${outvar}_MINOR 0 PARENT_SCOPE) + set(${outvar}_REVISION 0 PARENT_SCOPE) + set(${outvar}_BUILD 0 PARENT_SCOPE) + + find_program(CNTP_GIT_COMMAND git) + if(CNTP_GIT_COMMAND) + execute_process(COMMAND ${CNTP_GIT_COMMAND} describe --abbrev=0 --tags + OUTPUT_VARIABLE GIT_DESCRIBE_OUTPUT + RESULT_VARIABLE GIT_DESCRIBE_RESULT + OUTPUT_STRIP_TRAILING_WHITESPACE + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + if(CNTP_GIT_RESULT EQUAL 0) + execute_process(COMMAND ${CNTP_GIT_COMMAND} rev-list ${GIT_DESCRIBE_OUTPUT}.. --count + OUTPUT_VARIABLE GIT_REVLIST_OUTPUT + RESULT_VARIABLE GIT_DESCRIBE_RESULT + OUTPUT_STRIP_TRAILING_WHITESPACE + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + if(CNTP_GIT_RESULT EQUAL 0) + if(GIT_DESCRIBE_OUTPUT MATCHES "v*") + string(SUBSTRING ${GIT_DESCRIBE_OUTPUT} 1 -1 GIT_VERSION_STRIPPED) + string(REGEX REPLACE "\\." ";" GIT_VERSION_PARTS ${GIT_VERSION_STRIPPED}) + + # Default versions to 0 if they can't be found - the list will always have at least 3 elements + list(APPEND GIT_VERSION_PARTS 0 0 0) + list(POP_FRONT GIT_VERSION_PARTS ${outvar}_MAJOR ${outvar}_MINOR ${outvar}_REVISION) + + set(${outvar}_MAJOR ${${outvar}_MAJOR} PARENT_SCOPE) + set(${outvar}_MINOR ${${outvar}_MINOR} PARENT_SCOPE) + set(${outvar}_REVISION ${${outvar}_REVISION} PARENT_SCOPE) + set(${outvar}_BUILD ${GIT_REVLIST_OUTPUT} PARENT_SCOPE) + else() + message("Cannot determine repo version from Git; last tag does not start with v") + endif() + else() + message("Cannot determine repo version from Git; maybe not a Git repository?") + endif() + else() + message("Cannot determine repo version from Git; maybe not a Git repository?") + endif() + else() + message("Cannot determine repo version because Git is not installed") + endif() +endfunction() diff --git a/lib/cmake-scripts/cntp-winappx.cmake b/lib/cmake-scripts/cntp-winappx.cmake index 6d221cd1..68965d01 100644 --- a/lib/cmake-scripts/cntp-winappx.cmake +++ b/lib/cmake-scripts/cntp-winappx.cmake @@ -4,7 +4,10 @@ function(cntp_winappx target appxmanifest) get_target_property(APPX_DISPLAY_NAME ${target} READABLE_NAME) get_target_property(APPX_EXECUTABLE_NAME ${target} OUTPUT_NAME) + cntp_repoversion(REPOVERSION) + set(APPX_EXECUTABLE_NAME ${APPX_EXECUTABLE_NAME}.exe) set(APPX_ARCH x64) # TODO: Update + set(APPX_VERSION ${REPOVERSION_MAJOR}.${REPOVERSION_MINOR}.${REPOVERSION_REVISION}.${REPOVERSION_BUILD}) configure_file(${appxmanifest} appxmanifest.xml) endfunction() From 7071072236bd6963962a1eb0dc11c35a584cc497 Mon Sep 17 00:00:00 2001 From: Victor Tran Date: Tue, 25 Jul 2023 18:44:22 +1000 Subject: [PATCH 4/8] Make APPX_VERSION build always 0 --- lib/cmake-scripts/cntp-winappx.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmake-scripts/cntp-winappx.cmake b/lib/cmake-scripts/cntp-winappx.cmake index 68965d01..a803cacc 100644 --- a/lib/cmake-scripts/cntp-winappx.cmake +++ b/lib/cmake-scripts/cntp-winappx.cmake @@ -8,6 +8,6 @@ function(cntp_winappx target appxmanifest) set(APPX_EXECUTABLE_NAME ${APPX_EXECUTABLE_NAME}.exe) set(APPX_ARCH x64) # TODO: Update - set(APPX_VERSION ${REPOVERSION_MAJOR}.${REPOVERSION_MINOR}.${REPOVERSION_REVISION}.${REPOVERSION_BUILD}) + set(APPX_VERSION ${REPOVERSION_MAJOR}.${REPOVERSION_MINOR}.${REPOVERSION_REVISION}.0) configure_file(${appxmanifest} appxmanifest.xml) endfunction() From ec678435b682b2324d19fb392eec95a61aaef17c Mon Sep 17 00:00:00 2001 From: Victor Tran Date: Tue, 25 Jul 2023 19:41:05 +1000 Subject: [PATCH 5/8] Automatically set Windows SDK version --- lib/cmake-scripts/cntp-winappx.cmake | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/cmake-scripts/cntp-winappx.cmake b/lib/cmake-scripts/cntp-winappx.cmake index a803cacc..a5e6ab56 100644 --- a/lib/cmake-scripts/cntp-winappx.cmake +++ b/lib/cmake-scripts/cntp-winappx.cmake @@ -1,13 +1,16 @@ include_guard() function(cntp_winappx target appxmanifest) - get_target_property(APPX_DISPLAY_NAME ${target} READABLE_NAME) - get_target_property(APPX_EXECUTABLE_NAME ${target} OUTPUT_NAME) + if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + get_target_property(APPX_DISPLAY_NAME ${target} READABLE_NAME) + get_target_property(APPX_EXECUTABLE_NAME ${target} OUTPUT_NAME) - cntp_repoversion(REPOVERSION) + cntp_repoversion(REPOVERSION) - set(APPX_EXECUTABLE_NAME ${APPX_EXECUTABLE_NAME}.exe) - set(APPX_ARCH x64) # TODO: Update - set(APPX_VERSION ${REPOVERSION_MAJOR}.${REPOVERSION_MINOR}.${REPOVERSION_REVISION}.0) - configure_file(${appxmanifest} appxmanifest.xml) + set(APPX_EXECUTABLE_NAME ${APPX_EXECUTABLE_NAME}.exe) + set(APPX_ARCH x64) # TODO: Update + set(APPX_VERSION ${REPOVERSION_MAJOR}.${REPOVERSION_MINOR}.${REPOVERSION_REVISION}.0) + set(APPX_SDK_VERSION ${CMAKE_SYSTEM_VERSION}) + configure_file(${appxmanifest} appxmanifest.xml) + endif() endfunction() From 94573d02b5b4059c0adecb802d5c2bd6dc063ba6 Mon Sep 17 00:00:00 2001 From: Victor Tran Date: Tue, 25 Jul 2023 21:22:12 +1000 Subject: [PATCH 6/8] Format APPX_SDK_VERSION correctly --- lib/cmake-scripts/cntp-winappx.cmake | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/cmake-scripts/cntp-winappx.cmake b/lib/cmake-scripts/cntp-winappx.cmake index a5e6ab56..fccb36e5 100644 --- a/lib/cmake-scripts/cntp-winappx.cmake +++ b/lib/cmake-scripts/cntp-winappx.cmake @@ -7,10 +7,22 @@ function(cntp_winappx target appxmanifest) cntp_repoversion(REPOVERSION) + + string(REGEX REPLACE "\\." ";" APPX_SDK_VERSION_PARTS ${CMAKE_SYSTEM_VERSION}) + + # Default versions to 0 if they can't be found - the list will always have at least 4 elements + list(APPEND APPX_SDK_VERSION_PARTS 0 0 0 0) + list(POP_FRONT APPX_SDK_VERSION_PARTS APPX_SDK_VERSION_MAJOR APPX_SDK_VERSION_MINOR APPX_SDK_VERSION_REVISION APPX_SDK_VERSION_BUILD) + + set(${outvar}_MAJOR ${${outvar}_MAJOR} PARENT_SCOPE) + set(${outvar}_MINOR ${${outvar}_MINOR} PARENT_SCOPE) + set(${outvar}_REVISION ${${outvar}_REVISION} PARENT_SCOPE) + set(${outvar}_BUILD ${GIT_REVLIST_OUTPUT} PARENT_SCOPE) + set(APPX_EXECUTABLE_NAME ${APPX_EXECUTABLE_NAME}.exe) set(APPX_ARCH x64) # TODO: Update set(APPX_VERSION ${REPOVERSION_MAJOR}.${REPOVERSION_MINOR}.${REPOVERSION_REVISION}.0) - set(APPX_SDK_VERSION ${CMAKE_SYSTEM_VERSION}) + set(APPX_SDK_VERSION ${APPX_SDK_VERSION_MAJOR}.${APPX_SDK_VERSION_MINOR}.${APPX_SDK_VERSION_REVISION}.${APPX_SDK_VERSION_BUILD}) configure_file(${appxmanifest} appxmanifest.xml) endif() endfunction() From e7302563de1393b92059c94fafbafbbcf63268d5 Mon Sep 17 00:00:00 2001 From: Victor Tran Date: Mon, 4 Sep 2023 18:01:47 +1000 Subject: [PATCH 7/8] Add arm support to msix files --- cntp-windeploy/main.cpp | 4 ++-- lib/cmake-scripts/cntp-init.cmake | 2 ++ lib/cmake-scripts/cntp-winappx.cmake | 20 ++++++++++++++++++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/cntp-windeploy/main.cpp b/cntp-windeploy/main.cpp index 9a9459d4..6b982e6f 100644 --- a/cntp-windeploy/main.cpp +++ b/cntp-windeploy/main.cpp @@ -91,7 +91,7 @@ int main(int argc, char** argv) { QStringList supportLibraryPaths; QDir rootProjectDir = deployFolder.destinationDir().absoluteFilePath("./"); - for (QString markerFile : Common::findInPaths(".cntp-is-support-library", {rootProjectDir.absolutePath()}, true)) { + for (const QString &markerFile : Common::findInPaths(".cntp-is-support-library", {rootProjectDir.absolutePath()}, true)) { QFileInfo markerFileInfo(markerFile); QDir libDir = markerFileInfo.dir(); @@ -106,7 +106,7 @@ int main(int argc, char** argv) { output << "Creating System Library Database...\n"; output.flush(); - SystemLibraryDatabase* libraryDatabase = new SystemLibraryDatabase(supportLibraryPaths, sdkVersion, qt6CorePe.targetMachine(), libraryPaths); + auto* libraryDatabase = new SystemLibraryDatabase(supportLibraryPaths, sdkVersion, qt6CorePe.targetMachine(), libraryPaths); output << "Making folder self contained\n"; output.flush(); diff --git a/lib/cmake-scripts/cntp-init.cmake b/lib/cmake-scripts/cntp-init.cmake index 2667d583..46161e51 100644 --- a/lib/cmake-scripts/cntp-init.cmake +++ b/lib/cmake-scripts/cntp-init.cmake @@ -1,5 +1,7 @@ include_guard() +set(CNTP_TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR} CACHE STRING "Architecture to build for") + function(cntp_init target cxx-standard) option(CNTP_ASAN "Enable the use of AddressSanitizer" OFF) diff --git a/lib/cmake-scripts/cntp-winappx.cmake b/lib/cmake-scripts/cntp-winappx.cmake index fccb36e5..5a7e2a7c 100644 --- a/lib/cmake-scripts/cntp-winappx.cmake +++ b/lib/cmake-scripts/cntp-winappx.cmake @@ -1,5 +1,15 @@ include_guard() +function(cntp_translate_arch outvar arch) + if(${arch} STREQUAL "AMD64") + set(${outvar} "x64" PARENT_SCOPE) + elseif(${arch} STREQUAL "arm64") + set(${outvar} "arm64" PARENT_SCOPE) + else() + set(${outvar} ${arch} PARENT_SCOPE) + endif() +endfunction() + function(cntp_winappx target appxmanifest) if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") get_target_property(APPX_DISPLAY_NAME ${target} READABLE_NAME) @@ -7,8 +17,14 @@ function(cntp_winappx target appxmanifest) cntp_repoversion(REPOVERSION) + if(";${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION};$ENV{UCRTVersion};$ENV{WindowsSDKVersion};" MATCHES [=[;(10\.[0-9.]+)[;\]]=]) + get_filename_component(WINDOWS_KITS_BASE_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" ABSOLUTE) + set(WINDOWS_SDK_VERSION ${CMAKE_MATCH_1}) + endif() + + cntp_translate_arch(CNTP_TARGET_TRANSLATED_ARCH ${CNTP_TARGET_ARCH}) - string(REGEX REPLACE "\\." ";" APPX_SDK_VERSION_PARTS ${CMAKE_SYSTEM_VERSION}) + string(REGEX REPLACE "\\." ";" APPX_SDK_VERSION_PARTS ${WINDOWS_SDK_VERSION}) # Default versions to 0 if they can't be found - the list will always have at least 4 elements list(APPEND APPX_SDK_VERSION_PARTS 0 0 0 0) @@ -20,7 +36,7 @@ function(cntp_winappx target appxmanifest) set(${outvar}_BUILD ${GIT_REVLIST_OUTPUT} PARENT_SCOPE) set(APPX_EXECUTABLE_NAME ${APPX_EXECUTABLE_NAME}.exe) - set(APPX_ARCH x64) # TODO: Update + set(APPX_ARCH ${CNTP_TARGET_TRANSLATED_ARCH}) set(APPX_VERSION ${REPOVERSION_MAJOR}.${REPOVERSION_MINOR}.${REPOVERSION_REVISION}.0) set(APPX_SDK_VERSION ${APPX_SDK_VERSION_MAJOR}.${APPX_SDK_VERSION_MINOR}.${APPX_SDK_VERSION_REVISION}.${APPX_SDK_VERSION_BUILD}) configure_file(${appxmanifest} appxmanifest.xml) From aef949ed697005aee9e38f064f24b7e925a900e0 Mon Sep 17 00:00:00 2001 From: Victor Tran Date: Mon, 1 Apr 2024 22:15:49 +1100 Subject: [PATCH 8/8] Add MSIX icons --- cntp-appicontool/main.cpp | 33 ++++++++++++++++++++++++++++ lib/cmake-scripts/cntp-appicon.cmake | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/cntp-appicontool/main.cpp b/cntp-appicontool/main.cpp index 8f43e859..6b8cfa41 100644 --- a/cntp-appicontool/main.cpp +++ b/cntp-appicontool/main.cpp @@ -64,6 +64,10 @@ int main(int argc, char* argv[]) { {"p", "output-png"}, "PNG output file", "png-output" }); + parser.addOption({ + {"w", "output-msix"}, + "MSIX PNG output files", "msix-output" + }); parser.addOption({ {"b", "blueprint"}, "Create Blueprint style icon" @@ -202,5 +206,34 @@ int main(int argc, char* argv[]) { image.save(parser.value("output-png"), "PNG"); } + if (parser.isSet("output-msix")) { + eoutput << "Creating MSIX icons"; + + QDir msixDir(parser.value("output-msix")); + + QDir::root().mkpath(msixDir.path()); + + CombinedIcon pngIcon; + pngIcon.setBaseIcon(CombinedIcon::PlatformSpecificIcon); + pngIcon.setIconGradientColors(color1, color2); + pngIcon.setGenerateBlueprintIcon(parser.isSet("blueprint")); + pngIcon.setOverlayIcon(overlayIcon); + pngIcon.setOverlayIconMac(overlayIconMac); + + for (auto width : QList {30, 44, 70, 71, 150, 310}) { + QSize size{width, width}; + QImage image(size, QImage::Format_ARGB32); + image.fill(Qt::transparent); + + QPainter imagePainter(&image); + + QSvgRenderer renderer(pngIcon.generatedIcon().toUtf8()); + renderer.render(&imagePainter, QRect(QPoint(0, 0), size)); + imagePainter.end(); + + image.save(msixDir.absoluteFilePath(QStringLiteral("msix-%1.png").arg(size.width())), "PNG"); + } + } + return 0; } diff --git a/lib/cmake-scripts/cntp-appicon.cmake b/lib/cmake-scripts/cntp-appicon.cmake index e95ff891..26f8309f 100644 --- a/lib/cmake-scripts/cntp-appicon.cmake +++ b/lib/cmake-scripts/cntp-appicon.cmake @@ -34,7 +34,7 @@ function(cntp_app_icon targetName) IF(${CMAKE_SYSTEM_NAME} MATCHES "Windows") list(APPEND ICONTOOL_ARGS -n ${CMAKE_CURRENT_BINARY_DIR}/native.ico - -p ${CMAKE_CURRENT_BINARY_DIR}/appxicon.png) + -w ${CMAKE_CURRENT_BINARY_DIR}/appxicons) list(APPEND ICONTOOL_OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/native.ico)