Qt+CMake+CPack在Windows打包失败:GitHub Actions部署报错
GitHub Actions打包Qt C++应用Windows平台CMake错误
我正在通过GitHub Actions打包发布C++ Qt应用,对应的发布流程在Linux上运行正常,但在Windows平台执行时出现如下错误:
CPack: Create package using ZIP CPack: Install projects CPack: - Install project: MarkdownEdit [Release] CMake Error at D:/a/MarkdownEdit/MarkdownEdit/build/cmake_install.cmake:55 (include): include could not find requested file: D:/a/MarkdownEdit/MarkdownEdit/build/.qt/deploy_markdownedit_b3a8f1ec09-$<CONFIG>.cmake
我推测问题与这段CMake代码有关:
if(${QT_VERSION} GREATER_EQUAL 6.3 AND NOT FLATPAK) qt_generate_deploy_app_script( TARGET markdownedit FILENAME_VARIABLE deploy_script NO_UNSUPPORTED_PLATFORM_ERROR ) install(SCRIPT ${deploy_script}) endif()
需要说明的是,我日常不使用Windows,仅通过虚拟机测试,但在虚拟机中无法复现该问题,当前Windows环境使用的是Qt 6.5.1版本。
内容的提问来源于stack exchange,提问作者Tim
相关产品推荐
相关产品推荐

