Skip to content

Commit

Permalink
testing: findsentry
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulmathur001 committed Apr 4, 2024
1 parent e887b6e commit cc0607e
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Expand Up @@ -260,6 +260,8 @@ if(CCACHE_FOUND)
endif(CCACHE_FOUND)

set(SENTRY_BACKEND "crashpad")
set(SENTRY_INCLUDE_DIR "3rdparty/sentry-native/include")
set(SENTRY_LIBRARIES "3rdparty/sentry-native")

add_subdirectory(3rdparty/edbee-lib/edbee-lib)
add_subdirectory(3rdparty/communi)
Expand Down
39 changes: 39 additions & 0 deletions cmake/Findsentry.cmake
@@ -0,0 +1,39 @@
# - Try to find Sentry
# Once done, this will define
#
# SENTRY_FOUND - system has Sentry
# SENTRY_INCLUDE_DIRS - the Sentry include directory
# SENTRY_LIBRARIES - Link these to use Sentry
#
# Imported Targets
# sentry::sentry

if (SENTRY_INCLUDE_DIR)
# Already in cache, be silent
set(SENTRY_FIND_QUIETLY TRUE)
endif()

find_path(SENTRY_INCLUDE_DIR sentry.h
HINTS ${SENTRY_DIR}
PATH_SUFFIXES include
PATHS /usr/local /usr /sw /opt/local /opt c:/libs
NO_DEFAULT_PATH
)

find_library(SENTRY_LIBRARIES
NAMES sentry
HINTS ${SENTRY_DIR}
PATH_SUFFIXES lib64 lib
PATHS /usr/local /usr /sw /opt/local /opt c:/libs
NO_DEFAULT_PATH
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(sentry DEFAULT_MSG SENTRY_LIBRARIES SENTRY_INCLUDE_DIR)

if(SENTRY_FOUND)
set(SENTRY_LIBRARIES ${SENTRY_LIBRARIES} CACHE STRING "Sentry libraries")
set(SENTRY_INCLUDE_DIR ${SENTRY_INCLUDE_DIR} CACHE STRING "Sentry include directory")
endif()

mark_as_advanced(SENTRY_LIBRARIES SENTRY_INCLUDE_DIR)

0 comments on commit cc0607e

Please sign in to comment.