-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
83 lines (78 loc) · 1.81 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
#
# CMakeLists.txt
# Copyright (C) 2021 Marius Greuel
#
cmake_minimum_required(VERSION 3.12)
project(libelf)
add_library(libelf STATIC
src/32.fsize.c
src/32.getehdr.c
src/32.getphdr.c
src/32.getshdr.c
src/32.newehdr.c
src/32.newphdr.c
src/32.xlatetof.c
src/64.xlatetof.c
src/assert.c
src/begin.c
src/checksum.c
src/cntl.c
src/cook.c
src/data.c
src/end.c
src/errmsg.c
src/errno.c
src/fill.c
src/flag.c
src/gelfehdr.c
src/gelfphdr.c
src/gelfshdr.c
src/gelftrans.c
src/getarhdr.c
src/getaroff.c
src/getarsym.c
src/getbase.c
src/getdata.c
src/getident.c
src/getscn.c
src/hash.c
src/input.c
src/kind.c
src/memset.c
src/ndxscn.c
src/newdata.c
src/newscn.c
src/next.c
src/nextscn.c
src/nlist.c
src/opt.delscn.c
src/rand.c
src/rawdata.c
src/rawfile.c
src/strptr.c
src/swap64.c
src/update.c
src/verdef_32_tof.c
src/verdef_32_tom.c
src/verdef_64_tof.c
src/verdef_64_tom.c
src/version.c
src/x.elfext.c
src/x.movscn.c
src/x.remscn.c
)
target_include_directories(libelf
PUBLIC
include
PRIVATE
src
include/libelf
)
target_compile_definitions(libelf PRIVATE HAVE_CONFIG_H=1)
if(MSVC)
target_compile_definitions(libelf PRIVATE _CRT_SECURE_NO_WARNINGS=1)
target_compile_definitions(libelf PRIVATE _CRT_NONSTDC_NO_WARNINGS=1)
target_compile_options(libelf PRIVATE /wd4244) # warning C4244: '=': conversion from 'xxx' to 'xxx', possible loss of data
target_compile_options(libelf PRIVATE /wd4267) # warning C4267: 'function': conversion from 'xxx' to 'xxx', possible loss of data
target_compile_options(libelf PRIVATE /wd4311) # warning C4311: 'type cast': pointer truncation from 'xxx' to 'xxx'
endif()