xbot/CMakeLists.txt
2025-01-25 12:25:38 -08:00

43 lines
1.1 KiB
CMake

cmake_minimum_required(VERSION 3.25)
set(CMAKE_CXX_STANDARD 20)
project(xbot
VERSION 1
LANGUAGES CXX
)
find_package(PkgConfig REQUIRED)
find_package(Boost 1.83.0 CONFIG COMPONENTS log)
pkg_check_modules(LIBHS libhs REQUIRED IMPORTED_TARGET)
include(FetchContent)
FetchContent_Declare(
tomlplusplus
GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git
GIT_TAG v3.4.0
)
FetchContent_MakeAvailable(tomlplusplus)
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)
add_subdirectory(mybase64)
add_executable(xbot
main.cpp irc_commands.inc ircmsg.cpp settings.cpp connection.cpp
registration_thread.cpp
snote.cpp
self_thread.cpp
sasl_mechanism.cpp
irc_coroutine.cpp
)
target_include_directories(xbot PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(xbot PRIVATE Boost::log Boost::boost tomlplusplus_tomlplusplus PkgConfig::LIBHS mybase64)