ci: build Windows release package
Some checks failed
Build Windows Release / build-windows (push) Has been cancelled

This commit is contained in:
luochen570
2026-05-29 22:59:55 +08:00
parent 8c9a92f2cb
commit 2a70d6245e
9 changed files with 183 additions and 224 deletions

View File

@@ -8,11 +8,6 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC OFF)
# 本项目目标为 Linux 本地构建。Windows 工具链文件仅作为历史参考,不参与构建。
if (WIN32)
message(FATAL_ERROR "chengnan 当前按 README 要求只支持 Linux 构建,请不要使用 Windows 编译工具链。")
endif()
find_package(Qt6 QUIET COMPONENTS Widgets Concurrent)
if (NOT Qt6_FOUND)
find_package(Qt5 REQUIRED COMPONENTS Widgets Concurrent)
@@ -53,6 +48,10 @@ target_compile_definitions(chengnan PRIVATE
CHENGNAN_APP_VERSION="${PROJECT_VERSION}"
)
target_compile_options(chengnan PRIVATE -Wall -Wextra -Wpedantic)
if (MSVC)
target_compile_options(chengnan PRIVATE /W4 /permissive-)
else()
target_compile_options(chengnan PRIVATE -Wall -Wextra -Wpedantic)
endif()
install(TARGETS chengnan RUNTIME DESTINATION bin)