aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2023-04-06 21:43:29 -0400
committerCara Salter <cara@devcara.com>2023-04-06 21:43:29 -0400
commitacd1befde66db492149992199fadca92e55cc97b (patch)
tree16251d96cd8efd5323fa8f095bb29f110030f387 /CMakeLists.txt
parent555810bedc0cf9d9d954f56b5a2c8c92522ad27f (diff)
download142bot-acd1befde66db492149992199fadca92e55cc97b.tar.gz
142bot-acd1befde66db492149992199fadca92e55cc97b.zip
sentry: Add sentry support
Change-Id: I3cff2a05c63e88abddc8eff6a3ee9a9f73a5172d
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 13 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f26e300..3192505 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.0)
-project(142-bot VERSION 0.1 LANGUAGES CXX C)
+project(onefortytwobot VERSION 0.1 LANGUAGES CXX C)
set(CMAKE_CXX_STANDARD 20 REQUIRED)
@@ -24,8 +24,13 @@ FetchContent_Declare(spdlog
GIT_REPOSITORY https://github.com/gabime/spdlog
GIT_TAG v1.1.0
)
+
+FetchContent_Declare(sentry
+ GIT_REPOSITORY https://github.com/getsentry/sentry-native
+ GIT_TAG 0.6.1
+)
-FetchContent_MakeAvailable(clog dpp cpr fmt spdlog)
+FetchContent_MakeAvailable(clog dpp cpr fmt spdlog sentry)
include(cmake/FindPCRE.cmake)
@@ -36,13 +41,16 @@ string(ASCII 27 Esc)
find_library(PQXX_LIB pqxx)
find_library(PQ_LIB pq)
+# Define configuration file
+configure_file(142bot.config.in 142bot_config.h)
+
include(GNUInstallDirs)
aux_source_directory("src" coresrc)
add_executable(142bot ${coresrc})
-include_directories("include")
+include_directories("include" ${PROJECT_BINARY_DIR})
target_link_libraries(142bot PRIVATE clog dpp fmt::fmt spdlog::spdlog pcre
- cpr::cpr ${PQXX_LIB} ${PQ_LIB})
+ cpr::cpr ${PQXX_LIB} ${PQ_LIB} sentry)
add_dependencies(142bot clog dpp cpr fmt spdlog)
install(TARGETS 142bot)
@@ -56,7 +64,7 @@ foreach (fullmodname ${subdirlist})
aux_source_directory(${modules_dir}/${modname} modsrc)
add_library(module_${modname} SHARED ${modsrc})
add_dependencies(module_${modname} dpp cpr spdlog fmt)
- target_link_libraries(module_${modname} dpp cpr)
+ target_link_libraries(module_${modname} dpp cpr sentry)
install(TARGETS module_${modname} RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/142bot/")
set_target_properties(module_${modname} PROPERTIES PREFIX "")
endforeach(fullmodname)