diff options
| -rw-r--r-- | CMakeLists.txt | 83 | ||||
| -rw-r--r-- | bot/src/api/twitch/helix_client.cpp (renamed from src/api/twitch/helix_client.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/api/twitch/helix_client.hpp (renamed from src/api/twitch/helix_client.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/api/twitch/schemas/stream.hpp (renamed from src/api/twitch/schemas/stream.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/api/twitch/schemas/user.hpp (renamed from src/api/twitch/schemas/user.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/bundle.hpp (renamed from src/bundle.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/commands/command.cpp (renamed from src/commands/command.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/commands/command.hpp (renamed from src/commands/command.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/commands/request.hpp (renamed from src/commands/request.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/commands/request_util.cpp (renamed from src/commands/request_util.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/commands/request_util.hpp (renamed from src/commands/request_util.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/commands/response_error.hpp (renamed from src/commands/response_error.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/config.cpp (renamed from src/config.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/config.hpp (renamed from src/config.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/constants.hpp (renamed from src/constants.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/handlers.cpp (renamed from src/handlers.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/handlers.hpp (renamed from src/handlers.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/irc/client.cpp (renamed from src/irc/client.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/irc/client.hpp (renamed from src/irc/client.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/irc/message.cpp (renamed from src/irc/message.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/irc/message.hpp (renamed from src/irc/message.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/localization/line_id.cpp (renamed from src/localization/line_id.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/localization/line_id.hpp (renamed from src/localization/line_id.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/localization/localization.cpp (renamed from src/localization/localization.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/localization/localization.hpp (renamed from src/localization/localization.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/logger.cpp (renamed from src/logger.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/logger.hpp (renamed from src/logger.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/main.cpp (renamed from src/main.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/modules/custom_command.hpp (renamed from src/modules/custom_command.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/modules/event.hpp (renamed from src/modules/event.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/modules/help.hpp (renamed from src/modules/help.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/modules/join.hpp (renamed from src/modules/join.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/modules/massping.hpp (renamed from src/modules/massping.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/modules/notify.hpp (renamed from src/modules/notify.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/modules/ping.hpp (renamed from src/modules/ping.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/modules/timer.hpp (renamed from src/modules/timer.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/schemas/channel.hpp (renamed from src/schemas/channel.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/schemas/stream.cpp (renamed from src/schemas/stream.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/schemas/stream.hpp (renamed from src/schemas/stream.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/schemas/user.hpp (renamed from src/schemas/user.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/stream.cpp (renamed from src/stream.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/stream.hpp (renamed from src/stream.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/timer.cpp (renamed from src/timer.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/timer.hpp (renamed from src/timer.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/utils/chrono.cpp (renamed from src/utils/chrono.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/utils/chrono.hpp (renamed from src/utils/chrono.hpp) | 0 | ||||
| -rw-r--r-- | bot/src/utils/string.cpp (renamed from src/utils/string.cpp) | 0 | ||||
| -rw-r--r-- | bot/src/utils/string.hpp (renamed from src/utils/string.hpp) | 0 |
48 files changed, 43 insertions, 40 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c4146b6..1fef134 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 3.10) +include(FetchContent) project( RedpilledBot @@ -13,53 +14,55 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) add_definitions(-DUSE_TLS=1) -add_executable(Bot) +file(GLOB_RECURSE BOT_SRC_FILES "bot/src/*.cpp" "bot/src/*.h" "bot/src/*.hpp") -if(CMAKE_BUILD_TYPE STREQUAL "Debug") - target_compile_definitions(Bot PRIVATE DEBUG_MODE) -endif() +option(BUILD_BOT "Build the bot" ON) -set_target_properties( - Bot PROPERTIES - DESCRIPTION ${PROJECT_DESCRIPTION} - OUTPUT_NAME "redpilledbot" -) +if (BUILD_BOT) + add_executable(Bot) -file(GLOB_RECURSE SRC_FILES "src/*.cpp" "src/*.h" "src/*.hpp") + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + target_compile_definitions(Bot PRIVATE DEBUG_MODE) + endif() -target_sources(Bot PRIVATE ${SRC_FILES}) + set_target_properties( + Bot PROPERTIES + DESCRIPTION ${PROJECT_DESCRIPTION} + OUTPUT_NAME "redpilledbot" + ) -# Getting libraries -include(FetchContent) + target_sources(Bot PRIVATE ${BOT_SRC_FILES}) -# json -FetchContent_Declare( - json - URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz -) -FetchContent_MakeAvailable(json) + # Getting libraries + # json + FetchContent_Declare( + json + URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz + ) + FetchContent_MakeAvailable(json) -# http request maker -FetchContent_Declare( - cpr - GIT_REPOSITORY https://github.com/libcpr/cpr.git - GIT_TAG 1.10.5 -) -FetchContent_MakeAvailable(cpr) + # http request maker + FetchContent_Declare( + cpr + GIT_REPOSITORY https://github.com/libcpr/cpr.git + GIT_TAG 1.10.5 + ) + FetchContent_MakeAvailable(cpr) -# postgresql -FetchContent_Declare( - pqxx - GIT_REPOSITORY https://github.com/jtv/libpqxx.git - GIT_TAG 7.9.0 -) -FetchContent_MakeAvailable(pqxx) + # postgresql + FetchContent_Declare( + pqxx + GIT_REPOSITORY https://github.com/jtv/libpqxx.git + GIT_TAG 7.9.0 + ) + FetchContent_MakeAvailable(pqxx) -FetchContent_Declare( - ixwebsocket - GIT_REPOSITORY https://github.com/machinezone/IXWebSocket - GIT_TAG v11.4.5 -) -FetchContent_MakeAvailable(ixwebsocket) + FetchContent_Declare( + ixwebsocket + GIT_REPOSITORY https://github.com/machinezone/IXWebSocket + GIT_TAG v11.4.5 + ) + FetchContent_MakeAvailable(ixwebsocket) -target_link_libraries(Bot PRIVATE ixwebsocket::ixwebsocket pqxx nlohmann_json::nlohmann_json cpr::cpr) + target_link_libraries(Bot PRIVATE ixwebsocket::ixwebsocket pqxx nlohmann_json::nlohmann_json cpr::cpr) +endif() diff --git a/src/api/twitch/helix_client.cpp b/bot/src/api/twitch/helix_client.cpp index 04d630b..04d630b 100644 --- a/src/api/twitch/helix_client.cpp +++ b/bot/src/api/twitch/helix_client.cpp diff --git a/src/api/twitch/helix_client.hpp b/bot/src/api/twitch/helix_client.hpp index 27a9fa3..27a9fa3 100644 --- a/src/api/twitch/helix_client.hpp +++ b/bot/src/api/twitch/helix_client.hpp diff --git a/src/api/twitch/schemas/stream.hpp b/bot/src/api/twitch/schemas/stream.hpp index e3d485e..e3d485e 100644 --- a/src/api/twitch/schemas/stream.hpp +++ b/bot/src/api/twitch/schemas/stream.hpp diff --git a/src/api/twitch/schemas/user.hpp b/bot/src/api/twitch/schemas/user.hpp index 288ec72..288ec72 100644 --- a/src/api/twitch/schemas/user.hpp +++ b/bot/src/api/twitch/schemas/user.hpp diff --git a/src/bundle.hpp b/bot/src/bundle.hpp index d30f5f8..d30f5f8 100644 --- a/src/bundle.hpp +++ b/bot/src/bundle.hpp diff --git a/src/commands/command.cpp b/bot/src/commands/command.cpp index e3b45b1..e3b45b1 100644 --- a/src/commands/command.cpp +++ b/bot/src/commands/command.cpp diff --git a/src/commands/command.hpp b/bot/src/commands/command.hpp index 40ec114..40ec114 100644 --- a/src/commands/command.hpp +++ b/bot/src/commands/command.hpp diff --git a/src/commands/request.hpp b/bot/src/commands/request.hpp index e2685f1..e2685f1 100644 --- a/src/commands/request.hpp +++ b/bot/src/commands/request.hpp diff --git a/src/commands/request_util.cpp b/bot/src/commands/request_util.cpp index 90750e5..90750e5 100644 --- a/src/commands/request_util.cpp +++ b/bot/src/commands/request_util.cpp diff --git a/src/commands/request_util.hpp b/bot/src/commands/request_util.hpp index dea6e12..dea6e12 100644 --- a/src/commands/request_util.hpp +++ b/bot/src/commands/request_util.hpp diff --git a/src/commands/response_error.hpp b/bot/src/commands/response_error.hpp index ae2c3ee..ae2c3ee 100644 --- a/src/commands/response_error.hpp +++ b/bot/src/commands/response_error.hpp diff --git a/src/config.cpp b/bot/src/config.cpp index ec55913..ec55913 100644 --- a/src/config.cpp +++ b/bot/src/config.cpp diff --git a/src/config.hpp b/bot/src/config.hpp index 5c437d6..5c437d6 100644 --- a/src/config.hpp +++ b/bot/src/config.hpp diff --git a/src/constants.hpp b/bot/src/constants.hpp index 3c3462b..3c3462b 100644 --- a/src/constants.hpp +++ b/bot/src/constants.hpp diff --git a/src/handlers.cpp b/bot/src/handlers.cpp index c7820b4..c7820b4 100644 --- a/src/handlers.cpp +++ b/bot/src/handlers.cpp diff --git a/src/handlers.hpp b/bot/src/handlers.hpp index a143f76..a143f76 100644 --- a/src/handlers.hpp +++ b/bot/src/handlers.hpp diff --git a/src/irc/client.cpp b/bot/src/irc/client.cpp index 018736e..018736e 100644 --- a/src/irc/client.cpp +++ b/bot/src/irc/client.cpp diff --git a/src/irc/client.hpp b/bot/src/irc/client.hpp index cff867f..cff867f 100644 --- a/src/irc/client.hpp +++ b/bot/src/irc/client.hpp diff --git a/src/irc/message.cpp b/bot/src/irc/message.cpp index 569e691..569e691 100644 --- a/src/irc/message.cpp +++ b/bot/src/irc/message.cpp diff --git a/src/irc/message.hpp b/bot/src/irc/message.hpp index 164d7ca..164d7ca 100644 --- a/src/irc/message.hpp +++ b/bot/src/irc/message.hpp diff --git a/src/localization/line_id.cpp b/bot/src/localization/line_id.cpp index 567a3ba..567a3ba 100644 --- a/src/localization/line_id.cpp +++ b/bot/src/localization/line_id.cpp diff --git a/src/localization/line_id.hpp b/bot/src/localization/line_id.hpp index 41ceec6..41ceec6 100644 --- a/src/localization/line_id.hpp +++ b/bot/src/localization/line_id.hpp diff --git a/src/localization/localization.cpp b/bot/src/localization/localization.cpp index 2742602..2742602 100644 --- a/src/localization/localization.cpp +++ b/bot/src/localization/localization.cpp diff --git a/src/localization/localization.hpp b/bot/src/localization/localization.hpp index 4626c68..4626c68 100644 --- a/src/localization/localization.hpp +++ b/bot/src/localization/localization.hpp diff --git a/src/logger.cpp b/bot/src/logger.cpp index 3d142a2..3d142a2 100644 --- a/src/logger.cpp +++ b/bot/src/logger.cpp diff --git a/src/logger.hpp b/bot/src/logger.hpp index 91b4757..91b4757 100644 --- a/src/logger.hpp +++ b/bot/src/logger.hpp diff --git a/src/main.cpp b/bot/src/main.cpp index 3c8f5e7..3c8f5e7 100644 --- a/src/main.cpp +++ b/bot/src/main.cpp diff --git a/src/modules/custom_command.hpp b/bot/src/modules/custom_command.hpp index 50b3692..50b3692 100644 --- a/src/modules/custom_command.hpp +++ b/bot/src/modules/custom_command.hpp diff --git a/src/modules/event.hpp b/bot/src/modules/event.hpp index 4242f07..4242f07 100644 --- a/src/modules/event.hpp +++ b/bot/src/modules/event.hpp diff --git a/src/modules/help.hpp b/bot/src/modules/help.hpp index 13af228..13af228 100644 --- a/src/modules/help.hpp +++ b/bot/src/modules/help.hpp diff --git a/src/modules/join.hpp b/bot/src/modules/join.hpp index 16e8b4a..16e8b4a 100644 --- a/src/modules/join.hpp +++ b/bot/src/modules/join.hpp diff --git a/src/modules/massping.hpp b/bot/src/modules/massping.hpp index 2957e34..2957e34 100644 --- a/src/modules/massping.hpp +++ b/bot/src/modules/massping.hpp diff --git a/src/modules/notify.hpp b/bot/src/modules/notify.hpp index 3587e73..3587e73 100644 --- a/src/modules/notify.hpp +++ b/bot/src/modules/notify.hpp diff --git a/src/modules/ping.hpp b/bot/src/modules/ping.hpp index 836917d..836917d 100644 --- a/src/modules/ping.hpp +++ b/bot/src/modules/ping.hpp diff --git a/src/modules/timer.hpp b/bot/src/modules/timer.hpp index 36c3982..36c3982 100644 --- a/src/modules/timer.hpp +++ b/bot/src/modules/timer.hpp diff --git a/src/schemas/channel.hpp b/bot/src/schemas/channel.hpp index 2560331..2560331 100644 --- a/src/schemas/channel.hpp +++ b/bot/src/schemas/channel.hpp diff --git a/src/schemas/stream.cpp b/bot/src/schemas/stream.cpp index 6ef10dc..6ef10dc 100644 --- a/src/schemas/stream.cpp +++ b/bot/src/schemas/stream.cpp diff --git a/src/schemas/stream.hpp b/bot/src/schemas/stream.hpp index a636ea5..a636ea5 100644 --- a/src/schemas/stream.hpp +++ b/bot/src/schemas/stream.hpp diff --git a/src/schemas/user.hpp b/bot/src/schemas/user.hpp index 0bd1368..0bd1368 100644 --- a/src/schemas/user.hpp +++ b/bot/src/schemas/user.hpp diff --git a/src/stream.cpp b/bot/src/stream.cpp index 6e48fb8..6e48fb8 100644 --- a/src/stream.cpp +++ b/bot/src/stream.cpp diff --git a/src/stream.hpp b/bot/src/stream.hpp index 73313ed..73313ed 100644 --- a/src/stream.hpp +++ b/bot/src/stream.hpp diff --git a/src/timer.cpp b/bot/src/timer.cpp index 055dde0..055dde0 100644 --- a/src/timer.cpp +++ b/bot/src/timer.cpp diff --git a/src/timer.hpp b/bot/src/timer.hpp index 40a52ee..40a52ee 100644 --- a/src/timer.hpp +++ b/bot/src/timer.hpp diff --git a/src/utils/chrono.cpp b/bot/src/utils/chrono.cpp index 7a7f2c9..7a7f2c9 100644 --- a/src/utils/chrono.cpp +++ b/bot/src/utils/chrono.cpp diff --git a/src/utils/chrono.hpp b/bot/src/utils/chrono.hpp index 7e85e70..7e85e70 100644 --- a/src/utils/chrono.hpp +++ b/bot/src/utils/chrono.hpp diff --git a/src/utils/string.cpp b/bot/src/utils/string.cpp index 71c06bf..71c06bf 100644 --- a/src/utils/string.cpp +++ b/bot/src/utils/string.cpp diff --git a/src/utils/string.hpp b/bot/src/utils/string.hpp index c8385ad..c8385ad 100644 --- a/src/utils/string.hpp +++ b/bot/src/utils/string.hpp |
