aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--cmake/Findsentry.cmake14
2 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ffbe96a..1192b50 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.0)
-project(onefortytwobot VERSION 0.5 LANGUAGES CXX C)
+project(onefortytwobot VERSION 0.6 LANGUAGES CXX C)
set(CMAKE_CXX_STANDARD 20 REQUIRED)
set(FETCHCONTENT_TRY_FIND_PACKAGE_MODE OPT_IN)
diff --git a/cmake/Findsentry.cmake b/cmake/Findsentry.cmake
new file mode 100644
index 0000000..3c2b225
--- /dev/null
+++ b/cmake/Findsentry.cmake
@@ -0,0 +1,14 @@
+include(FindPackageHandleStandardArgs)
+
+find_library(SENTRY_LIBRARY NAMES sentry)
+
+find_package_handle_standard_args(sentry REQUIRED_VARS SENTRY_LIBRARY)
+
+if (SENTRY_FOUND)
+ mark_as_advanced(SENTRY_LIBRARY)
+endif()
+
+if(SENTRY_FOUND AND NOT TARGET sentry::sentry)
+ add_library(sentry::sentry IMPORTED UNKNOWN)
+ set_property(TARGET sentry::sentry PROPERTY IMPORTED_LOCATION ${SENTRY_LIBRARY})
+endif() \ No newline at end of file