PageRenderTime 122ms CodeModel.GetById 60ms app.highlight 1ms RepoModel.GetById 60ms app.codeStats 0ms

/thirdparty/breakpad/CMakeLists.txt

http://github.com/tomahawk-player/tomahawk
CMake | 88 lines | 78 code | 8 blank | 2 comment | 2 complexity | a48b792ea23d5712df616687bdf86d93 MD5 | raw file
 1PROJECT(breakpad)
 2cmake_minimum_required(VERSION 2.8)
 3
 4set( CMAKE_MODULE_PATH
 5     ${CMAKE_MODULE_PATH}
 6     ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules
 7)
 8
 9if( CMAKE_COMPILER_IS_GNUCXX )
10    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++98")
11endif()
12
13if(${CMAKE_BUILD_TYPE} MATCHES "Release")
14  add_definitions(-DNDEBUG)
15endif(${CMAKE_BUILD_TYPE} MATCHES "Release")
16
17IF(UNIX)
18    IF(APPLE)
19        SET( breakpadSources
20            client/mac/crash_generation/crash_generation_client.cc
21            client/mac/crash_generation/crash_generation_server.cc
22            client/mac/handler/breakpad_nlist_64.cc
23            client/mac/handler/dynamic_images.cc
24            client/mac/handler/exception_handler.cc
25            client/mac/handler/minidump_generator.cc
26            client/mac/handler/protected_memory_allocator.cc
27    #         client/mac/Framework/Breakpad.mm
28    #         client/mac/Framework/OnDemandServer.mm
29            common/mac/file_id.cc
30            common/mac/macho_id.cc
31            common/mac/macho_reader.cc
32            common/mac/macho_utilities.cc
33            common/mac/macho_walker.cc
34            common/mac/string_utilities.cc
35            common/md5.cc
36            common/mac/dump_syms.mm
37            common/mac/MachIPC.mm
38            common/mac/SimpleStringDictionary.mm
39            common/mac/bootstrap_compat.cc
40        )
41    ELSE(APPLE)
42        SET( breakpadSources
43            common/linux/safe_readlink.cc
44            client/linux/crash_generation/crash_generation_client.cc
45            client/linux/crash_generation/crash_generation_server.cc
46            client/linux/minidump_writer/minidump_writer.cc
47            client/linux/minidump_writer/linux_dumper.cc
48            client/linux/handler/exception_handler.cc
49            common/linux/dump_symbols.cc
50            common/linux/file_id.cc
51            common/linux/libcurl_wrapper.cc
52            common/linux/google_crashdump_uploader.cc
53            common/linux/synth_elf.cc
54            common/linux/http_upload.cc
55            common/linux/guid_creator.cc
56            common/linux/elf_symbols_to_module.cc
57            client/minidump_file_writer.cc
58            client/linux/minidump_writer/linux_ptrace_dumper.cc
59            common/linux/memory_mapped_file.cc
60            client/linux/log/log.cc
61        )
62    ENDIF(APPLE)
63
64    LIST(APPEND breakpadSources
65        client/minidump_file_writer.cc
66        common/convert_UTF.c
67        common/string_conversion.cc
68    )
69ENDIF(UNIX)
70
71IF(WIN32)
72    ADD_DEFINITIONS( -DUNICODE -fshort-wchar )
73    SET( breakpadSources
74        client/windows/handler/exception_handler.cc
75        client/windows/crash_generation/crash_generation_client.cc
76        common/windows/guid_string.cc
77    )
78ENDIF(WIN32)
79
80
81INCLUDE_DIRECTORIES(.)
82ADD_DEFINITIONS( -fPIC )
83IF(WIN32)
84    ADD_LIBRARY( tomahawk_breakpad SHARED ${breakpadSources} )
85ELSE()
86    ADD_LIBRARY( tomahawk_breakpad STATIC ${breakpadSources} )
87ENDIF()
88TARGET_LINK_LIBRARIES( tomahawk_breakpad )