mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-15 19:22:25 +08:00
cc271bcdf8
* support fkp * get default setting in qml * correct zixing * mark * TODO: parse fkp in c++ * scale the drawer * free assign * fix free assign bug * add submodule for official generals * generate fkp in cpp code * use UTF-8 in windows conhost * use onUse for regular skill * active skill for fkp * add fkp function; change data for DMG and Heal * add cancelable to askForDiscard * don't let generals naked * config bg and bgm * fix exists for win * bugfix: rewardandpunish * fkp: vs skill * room config * observe * god_salavation * fkp: judge * add read storage permission for android build * remove submodule fk_official * remove include/ * use a submodule as include directory * libgit2 * remove debugging 'downloadNewPack' * libgit2.dll for Windows * rewrite system_enum, disable dangerous function * fix bug in trigger() * filter skill * filter judgement card * add about page for git2 * very basic general detail * FKP: status skill * libgit: android test * libgit: build for android * 1 * libgit2.dll * android: load qm file after copy asset * filter skill: if no filter skill then remove filtered card * allow warning and critical to show a popup, and fix warnings from QML * resource: move general audio/image to packages/ * move assets of cards * FKP: modify * use sqlite db to manage packages * packman cli * packman gui * use Popup for error dialog * android full screen note * fix android ssl problem
78 lines
1.8 KiB
CMake
78 lines
1.8 KiB
CMake
cmake_minimum_required(VERSION 3.16)
|
|
|
|
project(FreeKill VERSION 0.0.1)
|
|
|
|
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Emscripten")
|
|
include_directories(fkparse/src)
|
|
add_subdirectory(fkparse)
|
|
endif ()
|
|
|
|
find_package(Qt6 REQUIRED COMPONENTS
|
|
Gui
|
|
Qml
|
|
Widgets
|
|
Network
|
|
Multimedia
|
|
QuickControls2
|
|
LinguistTools
|
|
)
|
|
|
|
find_package(OpenSSL)
|
|
find_package(Lua)
|
|
find_package(SQLite3)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
|
set(REQUIRED_QT_VERSION "6.3")
|
|
|
|
include_directories(include/lua)
|
|
include_directories(include)
|
|
include_directories(include/libgit2)
|
|
include_directories(src)
|
|
include_directories(src/client)
|
|
include_directories(src/core)
|
|
include_directories(src/network)
|
|
include_directories(src/server)
|
|
include_directories(src/ui)
|
|
|
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Emscripten")
|
|
# Fix include problem
|
|
include_directories("/usr/include/openssl-1.1/")
|
|
endif()
|
|
|
|
file(GLOB SWIG_FILES "${PROJECT_SOURCE_DIR}/src/swig/*.i")
|
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Emscripten")
|
|
set(SWIG_SOURCE ${PROJECT_SOURCE_DIR}/src/swig/freekill-wasm.i)
|
|
else ()
|
|
set(SWIG_SOURCE ${PROJECT_SOURCE_DIR}/src/swig/freekill.i)
|
|
endif ()
|
|
|
|
add_custom_command(
|
|
OUTPUT ${PROJECT_SOURCE_DIR}/src/swig/freekill-wrap.cxx
|
|
DEPENDS ${SWIG_FILES}
|
|
COMMENT "Generating freekill-wrap.cxx"
|
|
COMMAND swig -c++ -lua -Wall -o
|
|
${PROJECT_SOURCE_DIR}/src/swig/freekill-wrap.cxx
|
|
${SWIG_SOURCE}
|
|
)
|
|
|
|
qt_add_executable(FreeKill)
|
|
qt_add_translations(FreeKill
|
|
TS_FILES lang/zh_CN.ts
|
|
QM_FILES_OUTPUT_VARIABLE zh_CN.qm
|
|
)
|
|
|
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Emscripten")
|
|
file(GLOB_RECURSE FK_RESOURCE_FILES
|
|
RELATIVE ${PROJECT_SOURCE_DIR}
|
|
*.lua *.qml *.js *.png *.jpg *.mp3
|
|
)
|
|
list(APPEND FK_RESOURCE_FILES "fonts/FZLBGBK.ttf")
|
|
qt_add_resources(FreeKill "qrc"
|
|
PREFIX "/"
|
|
FILES ${FK_RESOURCE_FILES}
|
|
)
|
|
endif()
|
|
add_subdirectory(src)
|