Qt6/CMake: Include crash symbols for Microsoft Store app

36 Views Asked by At

How do I tell CMake to include symbols so that crash reports can be symbolicated, for a Qt6 app being built as a Microsoft Store app?

I am using Qt6.5 with CMake 3.24.


In case it is helpful, here is a summary of my current CMake structure (for a minimal project):

cmake_minimum_required(VERSION 3.24)

project(MyTarget VERSION 1.0.0 LANGUAGES CXX)

find_package(Qt6 6.5 REQUIRED COMPONENTS Quick)

qt_standard_project_setup()

qt_add_executable(MyTarget main.cpp)

qt_add_qml_module(MyTarget URI Primary VERSION 1.0 QML_FILES Main.qml)

set_target_properties(MyTarget PROPERTIES
  WIN32_EXECUTABLE TRUE
)

target_link_libraries(MyTarget PRIVATE Qt6::Quick)

install(TARGETS MyTarget
  BUNDLE_DESTINATION .
  LIBRARY_DESTINATION "${CMAKE_INSTALL_LIBDIR}"
  RUNTIME_DESTINATION "${CMAKE_INSTALL_BINDIR}"
)

qt_generate_deploy_qml_app_script(
  TARGET MyTarget
  OUTPUT_SCRIPT deploy_script
)

install(SCRIPT ${deploy_script})
include(InstallRequiredSystemLibraries)

#Configure AppxManifest.xml
#Install AppxManifest.xml and assets in ${CMAKE_INSTALL_PREFIX}
#Install CODE to pack, bundle and sign the app:
#  makeappx pack ...
#  makeappx bundle ...
#  signtool sign ...

This gets configured, build and installed to generate the .appxbundle file that can be uploaded to the Microsoft Partner Center.

0

There are 0 best solutions below