xbot/CMakeLists.txt

43 lines
1.1 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-23 12:46:52 -08:00
find_package(Boost 1.83.0 CONFIG COMPONENTS log)
2023-11-26 21:16:56 -08:00
pkg_check_modules(LIBHS libhs REQUIRED IMPORTED_TARGET)
2023-11-22 19:59:34 -08:00
include(FetchContent)
FetchContent_Declare(
tomlplusplus
GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git
GIT_TAG v3.4.0
)
FetchContent_MakeAvailable(tomlplusplus)
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)
2023-11-26 16:48:21 -08:00
add_executable(xbot
main.cpp irc_commands.inc ircmsg.cpp settings.cpp connection.cpp
2025-01-22 23:49:48 -08:00
registration_thread.cpp
2025-01-23 21:23:32 -08:00
snote.cpp
2025-01-22 23:49:48 -08:00
self_thread.cpp
2025-01-25 12:25:38 -08:00
sasl_mechanism.cpp
2025-01-23 12:46:52 -08:00
irc_coroutine.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-23 12:46:52 -08:00
target_link_libraries(xbot PRIVATE Boost::log Boost::boost tomlplusplus_tomlplusplus PkgConfig::LIBHS mybase64)