xbot/CMakeLists.txt

65 lines
1.5 KiB
CMake
Raw Normal View History

2025-01-23 12:46:52 -08:00
cmake_minimum_required(VERSION 3.25)
2023-11-22 19:59:34 -08:00
set(CMAKE_CXX_STANDARD 20)
project(xbot
VERSION 1
2025-01-23 12:46:52 -08:00
LANGUAGES CXX
2023-11-22 19:59:34 -08:00
)
2023-11-26 21:16:56 -08:00
find_package(PkgConfig REQUIRED)
2025-01-26 14:38:13 -08:00
find_package(OpenSSL REQUIRED)
2025-01-25 14:12:37 -08:00
2023-11-26 21:16:56 -08:00
pkg_check_modules(LIBHS libhs REQUIRED IMPORTED_TARGET)
2025-01-26 14:38:13 -08:00
set(BOOST_INCLUDE_LIBRARIES asio log signals2 endian)
2025-01-25 14:12:37 -08:00
set(BOOST_ENABLE_CMAKE ON)
2023-11-22 19:59:34 -08:00
include(FetchContent)
FetchContent_Declare(
2025-01-25 14:12:37 -08:00
Boost
URL https://github.com/boostorg/boost/releases/download/boost-1.87.0/boost-1.87.0-cmake.tar.xz
URL_HASH SHA1=4ec86f884ffb57ce7f6a6c6eb05b1af247aba0ac
2023-11-22 19:59:34 -08:00
)
2025-01-25 14:12:37 -08:00
FetchContent_Declare(
tomlplusplus
GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git
GIT_TAG v3.4.0
)
2023-11-22 19:59:34 -08:00
FetchContent_MakeAvailable(tomlplusplus)
2025-01-25 14:12:37 -08:00
FetchContent_MakeAvailable(Boost)
2023-11-22 19:59:34 -08:00
2023-11-26 15:08:55 -08:00
add_custom_command(
OUTPUT irc_commands.inc
COMMAND
gperf
-C -Z IrcCommandHash -K text -L C++ -t
--output-file irc_commands.inc
${CMAKE_CURRENT_SOURCE_DIR}/irc_commands.gperf
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/irc_commands.gperf
VERBATIM)
2025-01-22 20:33:17 -08:00
add_subdirectory(mybase64)
2025-01-26 14:38:13 -08:00
add_subdirectory(mysocks5)
2025-01-22 20:33:17 -08:00
2023-11-26 16:48:21 -08:00
add_executable(xbot
2025-01-25 21:24:33 -08:00
main.cpp
irc_commands.inc
bot.cpp
2025-01-28 17:15:13 -08:00
challenge.cpp
client.cpp
2025-01-25 21:24:33 -08:00
connection.cpp
irc_coroutine.cpp
ircmsg.cpp
2025-01-28 17:15:13 -08:00
openssl_errors.cpp
2025-01-26 19:35:56 -08:00
registration.cpp
2025-01-25 12:25:38 -08:00
sasl_mechanism.cpp
2025-01-25 21:24:33 -08:00
settings.cpp
snote.cpp
2025-01-22 23:49:48 -08:00
)
2025-01-23 12:46:52 -08:00
2023-11-26 15:08:55 -08:00
target_include_directories(xbot PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
2025-01-26 14:38:13 -08:00
target_link_libraries(xbot PRIVATE
OpenSSL::SSL
Boost::signals2 Boost::log Boost::asio
tomlplusplus_tomlplusplus
PkgConfig::LIBHS
mysocks5 mybase64)