mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 11:42:45 +08:00
Support MacOS (#365)
通过这个PR,FreeKill可以在MacOS上编译运行。 在repo根目录运行 `./build/FreeKill`,游戏可玩,有背景音,但是出牌语音似乎没了。是我的运行方式有问题么?
This commit is contained in:
parent
951a9a0497
commit
354e0ba42e
|
@ -98,7 +98,25 @@ Linux服务器
|
|||
MacOS
|
||||
-----
|
||||
|
||||
大致与Windows类似,但尚且缺少确切的方案。
|
||||
安装依赖:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
$ brew install libgit2 swig qt lua
|
||||
|
||||
更新submodule:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
$ git submodule update --init --recursive
|
||||
|
||||
然后使用命令行编译:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
$ mkdir build && cd build
|
||||
$ cmake ..
|
||||
$ make -j8
|
||||
|
||||
--------------
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE TS><TS>
|
||||
<!DOCTYPE TS><TS language="en_US">
|
||||
|
||||
<context>
|
||||
<name>Init</name>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE TS><TS>
|
||||
<!DOCTYPE TS><TS language="zh_CN">
|
||||
<context>
|
||||
<name>ClientSocket</name>
|
||||
<message>
|
||||
|
|
|
@ -63,6 +63,30 @@ elseif (ANDROID)
|
|||
QT_ANDROID_EXTRA_LIBS "${LUA_LIB};${SQLITE3_LIB};${CRYPTO_LIB};${SSL_LIB};${SSH_LIB};${GIT_LIB}"
|
||||
)
|
||||
list(REMOVE_ITEM QT_LIB Qt6::QuickControls2)
|
||||
elseif (APPLE)
|
||||
set(LUA_LIB ${LUA_LIBRARIES})
|
||||
set(SQLITE3_LIB sqlite3)
|
||||
set(CRYPTO_LIB OpenSSL::Crypto)
|
||||
set(READLINE_LIB readline)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/opt/homebrew/Cellar/libgit2")
|
||||
find_package(PkgConfig)
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(LIBGIT2 libgit2)
|
||||
if (LIBGIT2_FOUND)
|
||||
message(STATUS "Found libgit2: ${LIBGIT2_LIBRARIES}")
|
||||
else ()
|
||||
message(WARNING "libgit2 not found, try to find libgit2 by CMake")
|
||||
find_package(LibGit2)
|
||||
endif ()
|
||||
else ()
|
||||
message(WARNING "PkgConfig not found, try to find libgit2 by CMake")
|
||||
find_package(LibGit2)
|
||||
endif ()
|
||||
set(GIT_LIB ${LIBGIT2_LIBRARIES})
|
||||
target_link_directories(FreeKill PRIVATE
|
||||
${LIBGIT2_LIBRARY_DIRS}
|
||||
)
|
||||
else ()
|
||||
set(LUA_LIB lua5.4)
|
||||
set(SQLITE3_LIB sqlite3)
|
||||
|
|
Loading…
Reference in New Issue
Block a user