forked from google/breakpad
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
111 lines (97 loc) · 3.54 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# This is not a full replacement of the original gyp buildsystem
# It's just for building the dump_syms tool.
cmake_minimum_required(VERSION 3.12)
add_definitions(-DNO_STABS_SUPPORT)
if(APPLE)
add_definitions(-DHAVE_MACH_O_NLIST_H)
add_executable(dump_syms
src/tools/mac/dump_syms/dump_syms_tool.cc
src/common/mac/macho_walker.cc
src/common/mac/arch_utilities.cc
src/common/mac/macho_id.cc
src/common/mac/file_id.cc
src/common/mac/macho_utilities.cc
src/common/mac/dump_syms.cc
src/common/mac/macho_reader.cc
src/common/test_assembler.cc
src/common/module.cc
src/common/md5.cc
src/common/language.cc
src/common/dwarf_line_to_module.cc
src/common/path_helper.cc
src/common/stabs_reader.cc
src/common/stabs_to_module.cc
src/common/dwarf_cfi_to_module.cc
src/common/dwarf_cu_to_module.cc
src/common/dwarf/functioninfo.cc
src/common/dwarf/bytereader.cc
src/common/dwarf/elf_reader.cc
src/common/dwarf/dwarf2reader.cc
src/common/dwarf/cfi_assembler.cc
src/common/dwarf/dwarf2diehandler.cc
)
elseif(WIN32)
if(MINGW)
add_executable(dump_syms
src/tools/windows/dump_syms_dwarf/dump_syms.cc
src/common/pecoff/dump_symbols.cc
src/common/dwarf_cfi_to_module.cc
src/common/module.cc
src/common/pecoff/pecoffutils.cc
src/common/pecoff/pecoff_file_id.cc
src/common/stabs_to_module.cc
src/common/dwarf_cu_to_module.cc
src/common/language.cc
src/common/dwarf/dwarf2diehandler.cc
src/common/dwarf_line_to_module.cc
src/common/dwarf/dwarf2reader.cc
src/common/dwarf/bytereader.cc
src/common/pecoff/pecoff_file_id.cc
)
target_link_libraries(dump_syms
stdc++
)
elseif(MSVC)
add_executable(dump_syms
src/tools/windows/dump_syms/dump_syms.cc
src/common/windows/dia_util.cc
src/common/windows/guid_string.cc
src/common/windows/omap.cc
src/common/windows/pdb_source_line_writer.cc
src/common/windows/string_utils.cc
)
target_include_directories(dump_syms PRIVATE
"$ENV{VSINSTALLDIR}/DIA SDK/include"
)
target_link_libraries(dump_syms PRIVATE imagehlp)
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
target_link_libraries(dump_syms PRIVATE "$ENV{VSINSTALLDIR}/DIA SDK/lib/amd64/diaguids.lib")
else()
target_link_libraries(dump_syms PRIVATE "$ENV{VSINSTALLDIR}/DIA SDK/lib/diaguids.lib")
endif()
endif()
elseif("${CMAKE_SYSTEM}" MATCHES "Linux")
add_executable(dump_syms
src/tools/linux/dump_syms/dump_syms.cc
src/common/module.cc
src/common/language.cc
src/common/dwarf_line_to_module.cc
src/common/path_helper.cc
src/common/dwarf_cfi_to_module.cc
src/common/dwarf_cu_to_module.cc
src/common/dwarf/bytereader.cc
src/common/dwarf/dwarf2reader.cc
src/common/dwarf/dwarf2diehandler.cc
src/common/linux/crc32.cc
src/common/linux/dump_symbols.cc
src/common/linux/elf_core_dump.cc
src/common/linux/elf_symbols_to_module.cc
src/common/linux/elfutils.cc
src/common/linux/file_id.cc
src/common/linux/linux_libc_support.cc
src/common/linux/memory_mapped_file.cc
)
target_link_libraries(dump_syms pthread dl)
endif()
target_include_directories(dump_syms PRIVATE "src")
install(TARGETS dump_syms RUNTIME DESTINATION bin)