-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
90 lines (71 loc) · 2.7 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
# Almost all CMake files should start with this
# You should always specify a range with the newest
# and oldest tested versions of CMake. This will ensure
# you pick up the best policies.
cmake_minimum_required(VERSION 3.1...3.27)
project(
ROGueENEMY
VERSION 1.0
LANGUAGES C)
set(ROGUE_EXECUTABLE_NAME "rogue-enemy")
set(STRAY_EXECUTABLE_NAME "stray-ally")
set(ALLINONE_EXECUTABLE_NAME "allynone")
find_package(PkgConfig REQUIRED) # Include functions provided by PkgConfig module.
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
add_executable(${ROGUE_EXECUTABLE_NAME}
dev_timer.c
dev_evdev.c
dev_iio.c
dev_hidraw.c
dev_in.c
main.c
settings.c
rog_ally.c
legion_go.c
xbox360.c
rogue_enemy.c
)
add_executable(${STRAY_EXECUTABLE_NAME}
dev_out.c
stray_ally.c
settings.c
virt_ds4.c
virt_ds5.c
virt_mouse.c
virt_kbd.c
devices_status.c
rogue_enemy.c
)
add_executable(${ALLINONE_EXECUTABLE_NAME}
dev_out.c
allynone.c
settings.c
virt_ds4.c
virt_ds5.c
virt_mouse.c
virt_kbd.c
devices_status.c
dev_timer.c
dev_evdev.c
dev_iio.c
dev_hidraw.c
dev_in.c
settings.c
rog_ally.c
legion_go.c
xbox360.c
rogue_enemy.c
)
set_property(TARGET ${ALLINONE_EXECUTABLE_NAME} PROPERTY C_STANDARD 17)
target_link_libraries(${ALLINONE_EXECUTABLE_NAME} PRIVATE Threads::Threads -levdev -ludev -lconfig -lm -lz)
set_target_properties(${ALLINONE_EXECUTABLE_NAME} PROPERTIES LINKER_LANGUAGE C)
install(TARGETS ${ALLINONE_EXECUTABLE_NAME} DESTINATION bin)
set_property(TARGET ${ROGUE_EXECUTABLE_NAME} PROPERTY C_STANDARD 17)
target_link_libraries(${ROGUE_EXECUTABLE_NAME} PRIVATE Threads::Threads -levdev -ludev -lconfig -lm)
set_target_properties(${ROGUE_EXECUTABLE_NAME} PROPERTIES LINKER_LANGUAGE C)
install(TARGETS ${ROGUE_EXECUTABLE_NAME} DESTINATION bin)
set_property(TARGET ${STRAY_EXECUTABLE_NAME} PROPERTY C_STANDARD 17)
target_link_libraries(${STRAY_EXECUTABLE_NAME} PRIVATE Threads::Threads -levdev -ludev -lconfig -lm -lz)
set_target_properties(${STRAY_EXECUTABLE_NAME} PROPERTIES LINKER_LANGUAGE C)
install(TARGETS ${STRAY_EXECUTABLE_NAME} DESTINATION bin)