From 2a49844a95593ac98e919c18651320e62f276fa7 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sun, 6 Apr 2025 17:28:47 +0400 Subject: feat: implementing lua coding --- bot/CMakeLists.txt | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'bot/CMakeLists.txt') diff --git a/bot/CMakeLists.txt b/bot/CMakeLists.txt index 1806c03..a01cc7f 100644 --- a/bot/CMakeLists.txt +++ b/bot/CMakeLists.txt @@ -4,6 +4,7 @@ include(FetchContent) # Creating symbolic links create_symlink_if_exists("${CMAKE_SOURCE_DIR}/localization" "${CMAKE_CURRENT_BINARY_DIR}/localization") create_symlink_if_exists("${CMAKE_SOURCE_DIR}/luamods" "${CMAKE_CURRENT_BINARY_DIR}/luamods") + if (EXISTS "${CMAKE_SOURCE_DIR}/.env") create_symlink_if_exists("${CMAKE_SOURCE_DIR}/.env" "${CMAKE_CURRENT_BINARY_DIR}/.env") endif() @@ -53,6 +54,7 @@ FetchContent_Declare( ) FetchContent_MakeAvailable(pqxx) +# websockets FetchContent_Declare( ixwebsocket GIT_REPOSITORY https://github.com/machinezone/IXWebSocket @@ -60,5 +62,22 @@ FetchContent_Declare( ) FetchContent_MakeAvailable(ixwebsocket) -target_link_libraries(Bot PRIVATE ixwebsocket::ixwebsocket pqxx nlohmann_json::nlohmann_json cpr::cpr) +set(SOL2_LUA_VERSION "5.4.8" CACHE STRING "The version of Lua used") +set(SOL2_BUILD_LUA FALSE CACHE BOOL "Always build Lua, do not search for it in the system") + +FetchContent_Declare( + sol + GIT_REPOSITORY https://github.com/ThePhD/sol2.git + GIT_TAG v3.5.0 +) +FetchContent_MakeAvailable(sol) + +target_link_libraries(Bot PRIVATE + ixwebsocket::ixwebsocket + pqxx + nlohmann_json::nlohmann_json + cpr::cpr + lua + sol2::sol2 +) -- cgit v1.2.3