-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
68 lines (50 loc) · 1.13 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
cmake_minimum_required(VERSION 3.1)
project(lyn VERSION "2.5.3")
option(USE_STATIC_LIBRARIES "When on, passes -static to the compiler" ON)
include(config.cmake)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(ELFCPP_SOURCE_LIST
elfcpp/aarch64.h
elfcpp/dwarf.h
elfcpp/elfcpp.h
elfcpp/elfcpp_swap.h
elfcpp/mips.h
elfcpp/sparc.h
elfcpp/x86_64.h
elfcpp/arm.h
elfcpp/elfcpp_file.h
elfcpp/elfcpp_internal.h
elfcpp/i386.h
elfcpp/powerpc.h
elfcpp/s390.h
elfcpp/tilegx.h
)
set(LYN_SOURCE_LIST
main.cpp
util/hex_write.h
core/data_chunk.h
core/data_chunk.cpp
core/data_file.h
core/data_file.cpp
ea/event_code.h
ea/event_code.cpp
ea/event_section.h
ea/event_section.cpp
core/section_data.h
core/section_data.cpp
core/event_object.h
core/event_object.cpp
core/arm_relocator.h
core/arm_relocator.cpp
)
set(SOURCE_LIST
${ELFCPP_SOURCE_LIST}
${LYN_SOURCE_LIST}
)
# this is to ensure inclusion relative to base directory is allowed
include_directories(${CMAKE_SOURCE_DIR})
if(USE_STATIC_LIBRARIES)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
endif()
add_executable(${PROJECT_NAME} ${SOURCE_LIST})