ci: build Windows release package
Some checks failed
Build Windows Release / build-windows (push) Has been cancelled
Some checks failed
Build Windows Release / build-windows (push) Has been cancelled
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user