-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
22 lines (19 loc) · 1.06 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
cmake_minimum_required(VERSION 3.0.0)
project(cli-breakpad VERSION 0.1.0)
add_executable(cli-breakpad main.cpp)
target_include_directories(cli-breakpad PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/breakpad/include
)
if(WIN32)
set_target_properties(cli-breakpad PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
target_link_directories(cli-breakpad PRIVATE
$<$<CONFIG:Debug>:"${CMAKE_CURRENT_SOURCE_DIR}/breakpad/windows/${CMAKE_SYSTEM_PROCESSOR}/Debug">
$<$<CONFIG:Release>:"${CMAKE_CURRENT_SOURCE_DIR}/breakpad/windows/${CMAKE_SYSTEM_PROCESSOR}/Release">)
target_link_libraries(cli-breakpad PRIVATE exception_handler crash_generation_client common)
elseif(APPLE)
find_library(BREAKPAD_CLIENT Breakpad "${CMAKE_CURRENT_SOURCE_DIR}/breakpad/mac/")
target_link_libraries(cli-breakpad PRIVATE ${BREAKPAD_CLIENT})
elseif(UNIX)
target_link_directories(cli-breakpad PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/breakpad/linux/${CMAKE_SYSTEM_PROCESSOR}")
target_link_libraries(cli-breakpad PRIVATE breakpad_client pthread)
endif()