mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-15 19:22:25 +08:00
196e92f5d3
* lua端的ob属性根本没同步,同步一下 * [需要C++] 让requestTimer的超时影响到Lua * 修复windows没图标 * qmllint; remove modmaker * 修理了选卡器 * 修理了确定取消消失 * 删除了已经不用的autoPending和respond_play * 修复异常烧条(或许吧) * 修复负数烧条时间,若为负数则无事发生
67 lines
1.5 KiB
CMake
67 lines
1.5 KiB
CMake
# SPDX-License-Identifier: GPL-3.0-or-later
|
||
# ------------------------------------------------------------
|
||
# 此为新月杀的项目组织文件,采用CMake+QT
|
||
# 2022-01-24 新建文件夹 2023-02-21 发布v0.0.1版本
|
||
# ------------------------------------------------------------
|
||
|
||
cmake_minimum_required(VERSION 3.22)
|
||
|
||
project(FreeKill VERSION 0.4.20)
|
||
add_definitions(-DFK_VERSION=\"${CMAKE_PROJECT_VERSION}\")
|
||
|
||
find_package(Qt6 REQUIRED COMPONENTS
|
||
Network
|
||
)
|
||
|
||
if (NOT DEFINED FK_SERVER_ONLY)
|
||
find_package(Qt6 REQUIRED COMPONENTS
|
||
Gui
|
||
Qml
|
||
Widgets
|
||
Multimedia
|
||
QuickControls2
|
||
LinguistTools
|
||
)
|
||
else ()
|
||
add_definitions(-DFK_SERVER_ONLY)
|
||
endif()
|
||
|
||
find_package(OpenSSL)
|
||
find_package(Lua)
|
||
find_package(SQLite3)
|
||
|
||
set(CMAKE_AUTOMOC ON)
|
||
set(CMAKE_CXX_STANDARD 17)
|
||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||
set(REQUIRED_QT_VERSION "6.4")
|
||
|
||
include_directories(include/lua)
|
||
include_directories(include)
|
||
include_directories(include/libgit2)
|
||
include_directories(src)
|
||
|
||
qt_add_executable(FreeKill)
|
||
|
||
if (NOT DEFINED FK_SERVER_ONLY)
|
||
qt_add_translations(FreeKill
|
||
TS_FILES lang/zh_CN.ts
|
||
QM_FILES_OUTPUT_VARIABLE zh_CN.qm
|
||
|
||
TS_FILES lang/en_US.ts
|
||
QM_FILES_OUTPUT_VARIABLE en_US.qm
|
||
)
|
||
endif()
|
||
|
||
add_custom_command(
|
||
TARGET FreeKill
|
||
POST_BUILD
|
||
COMMENT "Generating version file fk_ver"
|
||
COMMAND echo ${CMAKE_PROJECT_VERSION} > ${PROJECT_SOURCE_DIR}/fk_ver
|
||
COMMAND ${PROJECT_SOURCE_DIR}/genfkver.sh
|
||
)
|
||
|
||
add_subdirectory(src)
|
||
|
||
enable_testing()
|
||
add_subdirectory(test)
|