forked from getsentry/sentry-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
31 lines (22 loc) · 951 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
cmake_minimum_required (VERSION 3.0)
project(sentry LANGUAGES C CXX ASM)
include(GNUInstallDirs)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration -Werror=incompatible-function-pointer-types")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
include_directories("include")
set(SENTRY_NATIVE_SOURCE_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/src)
file(GLOB_RECURSE SENTRY_NATIVE_SOURCES
${SENTRY_NATIVE_SOURCE_ROOT}/*.c
${SENTRY_NATIVE_SOURCE_ROOT}/*.cpp
)
add_definitions(-DSENTRY_WITH_INPROC_BACKEND)
add_library(sentry SHARED ${SENTRY_NATIVE_SOURCES})
include_directories(sentry PUBLIC include)
install(TARGETS sentry
EXPORT ${PROJECT_NAME}-config
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
set(HEADERS include/sentry.h)
install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sentry)
install(EXPORT ${PROJECT_NAME}-config DESTINATION cmake)