-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
76 lines (64 loc) · 2.12 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
cmake_minimum_required(VERSION 3.22)
project(adbd LANGUAGES C)
include(cmake/bfdev.cmake)
include(cmake/sanitize.cmake)
include(cmake/config.cmake)
set(XDBD_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(XDBD_GENERATED_PATH ${PROJECT_BINARY_DIR}/generated)
configure_file(
${XDBD_MODULE_PATH}/xdbd_config.h.in
${XDBD_GENERATED_PATH}/xdbd_config.h
)
set(HEADERS
${PROJECT_SOURCE_DIR}/include/xdbd.h
)
set(SRCS
${HEADERS}
${PROJECT_SOURCE_DIR}/src/adb/adb.c
${PROJECT_SOURCE_DIR}/src/adb/command.c
${PROJECT_SOURCE_DIR}/src/adb/packet.c
${PROJECT_SOURCE_DIR}/src/adb/xdbd_adb.c
${PROJECT_SOURCE_DIR}/src/adb/xdbd_adb_request.c
${PROJECT_SOURCE_DIR}/src/connection/connection.c
${PROJECT_SOURCE_DIR}/src/connection/tcp/xdbd_connection_tcp.c
${PROJECT_SOURCE_DIR}/src/connection/usb/xdbd_connection_usb.c
${PROJECT_SOURCE_DIR}/src/core/xdbd_buf.c
${PROJECT_SOURCE_DIR}/src/core/xdbd_pool.c
${PROJECT_SOURCE_DIR}/src/core/xdbd_times.c
${PROJECT_SOURCE_DIR}/src/event/select/xdbd_select.c
${PROJECT_SOURCE_DIR}/src/event/xdbd_event.c
${PROJECT_SOURCE_DIR}/src/event/xdbd_timer.c
${PROJECT_SOURCE_DIR}/src/os/unix/xdbd_process.c
${PROJECT_SOURCE_DIR}/src/service/xdbd_service.c
${PROJECT_SOURCE_DIR}/src/service/shell/xdbd_shell_service.c
${PROJECT_SOURCE_DIR}/src/xdbd.c
)
if(LINUX)
set(SRCS
${SRCS}
${PROJECT_SOURCE_DIR}/src/connection/usb/xdbd_connection_usb.c
)
endif()
set(
XADB_INCLUDES
${PROJECT_SOURCE_DIR}/include/
${PROJECT_SOURCE_DIR}/src/adb/
${PROJECT_SOURCE_DIR}/src/event/
${PROJECT_SOURCE_DIR}/src/connection/
${PROJECT_SOURCE_DIR}/src/connection/tcp/
${PROJECT_SOURCE_DIR}/src/connection/usb/
${PROJECT_SOURCE_DIR}/src/core/
#FIXME: check platform
${PROJECT_SOURCE_DIR}/src/os/unix/
${PROJECT_SOURCE_DIR}/src/service/
${PROJECT_SOURCE_DIR}/src/service/shell/
)
include_directories(${XADB_INCLUDES})
include_directories(${XDBD_GENERATED_PATH})
add_executable(adbd ${SRCS})
target_link_libraries(adbd bfdev)
target_link_libraries(adbd util)
install(TARGETS
adbd
DESTINATION ${CMAKE_INSTALL_BINDIR}
)