aboutsummaryrefslogtreecommitdiff
path: root/cmake/Findsentry.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Findsentry.cmake')
-rw-r--r--cmake/Findsentry.cmake14
1 files changed, 14 insertions, 0 deletions
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