-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
28 lines (21 loc) · 928 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
cmake_minimum_required(VERSION 2.8)
project(crashcatcher C)
include_directories("${crashcatcher_SOURCE_DIR}/include" "${crashcatcher_BINARY_DIR}")
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
set(CRASHCATCHER_NAME crashcatcher64)
else(CMAKE_SIZEOF_VOID_P MATCHES "8")
set(CRASHCATCHER_NAME crashcatcher32)
endif(CMAKE_SIZEOF_VOID_P MATCHES "8")
configure_file("${crashcatcher_SOURCE_DIR}/config.h.cmake"
"${crashcatcher_BINARY_DIR}/config.h")
add_definitions("-Wall -Wextra")
add_library(crash SHARED libcrash/handler.c)
set_target_properties(crash PROPERTIES VERSION 0.0.1
SOVERSION 0)
add_executable(${CRASHCATCHER_NAME} main.c)
target_link_libraries(${CRASHCATCHER_NAME} crash)
install(TARGETS ${CRASHCATCHER_NAME} crash
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib${LIB_SUFFIX})
install(FILES include/crashcatcher.h
DESTINATION include)