blob: 1d97b3983ce2a56d5ed4fbe786604be1126f8318 (
plain)
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
|
file(GLOB CMD_SOURCES CONFIGURE_DEPENDS "*.cpp")
list(APPEND SPECIAL_TARGETS test install)
list(APPEND REQUIRED_TARGETS
arp base64 basename cat chmod chown clear comm cp cut date dd df diff dirname dmesg du echo env expr false fgrep
file find grep groups head host hostname id ifconfig kill killall ln logout ls mkdir mount mv nproc
pgrep pidof ping pkill pmap ps readlink realpath reboot rm rmdir route seq shutdown sleep sort stat stty su tail test
touch tr true umount uname uniq uptime w wc which whoami xargs yes less
)
list(APPEND RECOMMENDED_TARGETS
adjtime aplay abench asctl bt checksum chres cksum copy fortune gunzip gzip init install keymap lsirq lsof lspci man mknod mktemp
nc netstat notify ntpquery open passwd pls printf pro shot tar tt unzip wallpaper zip
)
# FIXME: Support specifying component dependencies for utilities (e.g. WebSocket for telws)
foreach(CMD_SRC ${CMD_SOURCES})
get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE)
if (CMD_NAME IN_LIST SPECIAL_TARGETS)
set(TARGET_NAME "${CMD_NAME}-bin")
else()
set(TARGET_NAME "${CMD_NAME}")
endif()
if(CMD_NAME IN_LIST REQUIRED_TARGETS)
serenity_component(
${CMD_NAME}
REQUIRED
TARGETS ${TARGET_NAME}
)
elseif(CMD_NAME IN_LIST RECOMMENDED_TARGETS)
serenity_component(
${CMD_NAME}
RECOMMENDED
TARGETS ${TARGET_NAME}
)
else()
serenity_component(
${CMD_NAME}
TARGETS ${TARGET_NAME}
)
endif()
if (CMD_NAME IN_LIST SPECIAL_TARGETS)
add_executable(${TARGET_NAME} ${CMD_SRC})
target_link_libraries(${TARGET_NAME} PRIVATE LibCore LibMain)
serenity_set_implicit_links(${TARGET_NAME})
install(TARGETS ${TARGET_NAME} RUNTIME DESTINATION bin)
install(CODE "file(RENAME ${CMAKE_INSTALL_PREFIX}/bin/${CMD_NAME}-bin ${CMAKE_INSTALL_PREFIX}/bin/${CMD_NAME})")
else()
add_executable(${CMD_NAME} ${CMD_SRC})
set_target_properties(${CMD_NAME} PROPERTIES EXCLUDE_FROM_ALL TRUE)
target_link_libraries(${CMD_NAME} PRIVATE LibCore)
serenity_set_implicit_links(${TARGET_NAME})
install(TARGETS ${CMD_NAME} RUNTIME DESTINATION bin OPTIONAL)
endif()
endforeach()
if (ENABLE_JAKT)
add_jakt_executable(hello-jakt
MAIN_SOURCE hello-world.jakt
)
target_link_libraries(hello-jakt PRIVATE LibC)
set_target_properties(hello-jakt PROPERTIES EXCLUDE_FROM_ALL TRUE)
install(TARGETS hello-jakt RUNTIME DESTINATION bin OPTIONAL)
serenity_component(
hello-jakt
RECOMMENDED
TARGETS hello-jakt
)
endif()
install(CODE "file(CREATE_LINK grep ${CMAKE_INSTALL_PREFIX}/bin/egrep SYMBOLIC)")
install(CODE "file(CREATE_LINK grep ${CMAKE_INSTALL_PREFIX}/bin/rgrep SYMBOLIC)")
target_link_libraries(abench PRIVATE LibAudio LibMain LibCore)
target_link_libraries(adjtime PRIVATE LibMain)
target_link_libraries(allocate PRIVATE LibMain)
target_link_libraries(aplay PRIVATE LibAudio LibIPC LibMain)
target_link_libraries(arp PRIVATE LibMain)
target_link_libraries(asctl PRIVATE LibAudio LibIPC LibMain)
target_link_libraries(base64 PRIVATE LibMain)
target_link_libraries(basename PRIVATE LibMain)
target_link_libraries(beep PRIVATE LibMain)
target_link_libraries(blockdev PRIVATE LibMain)
target_link_libraries(bt PRIVATE LibSymbolication LibMain)
target_link_libraries(cal PRIVATE LibMain)
target_link_libraries(cat PRIVATE LibMain)
target_link_libraries(checksum PRIVATE LibCrypto LibMain)
target_link_libraries(chgrp PRIVATE LibMain)
target_link_libraries(chmod PRIVATE LibMain)
target_link_libraries(chown PRIVATE LibMain)
target_link_libraries(chres PRIVATE LibGUI LibIPC LibMain)
target_link_libraries(cksum PRIVATE LibCrypto LibMain)
target_link_libraries(clear PRIVATE LibMain)
target_link_libraries(cmp PRIVATE LibMain)
target_link_libraries(comm PRIVATE LibMain)
target_link_libraries(config PRIVATE LibConfig LibIPC LibMain)
target_link_libraries(copy PRIVATE LibGUI LibMain)
target_link_libraries(cp PRIVATE LibMain)
target_link_libraries(cpp-lexer PRIVATE LibCpp LibMain)
target_link_libraries(cpp-parser PRIVATE LibCpp LibMain)
target_link_libraries(cpp-preprocessor PRIVATE LibCpp LibMain)
target_link_libraries(cut PRIVATE LibMain)
target_link_libraries(date PRIVATE LibMain)
target_link_libraries(dd PRIVATE LibMain)
target_link_libraries(df PRIVATE LibMain)
target_link_libraries(diff PRIVATE LibDiff LibMain)
target_link_libraries(dirname PRIVATE LibMain)
target_link_libraries(disasm PRIVATE LibX86 LibMain)
target_link_libraries(disk_benchmark PRIVATE LibMain)
target_link_libraries(dmesg PRIVATE LibMain)
target_link_libraries(du PRIVATE LibMain)
target_link_libraries(echo PRIVATE LibMain)
target_link_libraries(env PRIVATE LibMain)
target_link_libraries(errno PRIVATE LibMain)
target_link_libraries(expr PRIVATE LibRegex LibMain)
target_link_libraries(false PRIVATE LibMain)
target_link_libraries(fdtdump PRIVATE LibDeviceTree LibMain)
target_link_libraries(fgrep PRIVATE LibMain)
target_link_libraries(file PRIVATE LibGfx LibIPC LibCompress LibMain)
target_link_libraries(find PRIVATE LibMain)
target_link_libraries(flock PRIVATE LibMain)
target_link_libraries(fortune PRIVATE LibMain)
target_link_libraries(functrace PRIVATE LibDebug LibX86 LibMain)
target_link_libraries(gml-format PRIVATE LibGUI LibMain)
target_link_libraries(grep PRIVATE LibRegex LibMain)
target_link_libraries(gron PRIVATE LibMain)
target_link_libraries(groupadd PRIVATE LibMain)
target_link_libraries(groupdel PRIVATE LibMain)
target_link_libraries(groups PRIVATE LibMain)
target_link_libraries(gunzip PRIVATE LibCompress LibMain)
target_link_libraries(gzip PRIVATE LibCompress LibMain)
target_link_libraries(head PRIVATE LibMain)
target_link_libraries(headless-browser PRIVATE LibCore LibCrypto LibGemini LibGfx LibHTTP LibTLS LibWeb LibWebSocket LibMain)
target_link_libraries(hexdump PRIVATE LibMain)
target_link_libraries(host PRIVATE LibMain)
target_link_libraries(hostname PRIVATE LibMain)
target_link_libraries(id PRIVATE LibMain)
target_link_libraries(ifconfig PRIVATE LibMain)
target_link_libraries(ini PRIVATE LibMain)
target_link_libraries(install-bin PRIVATE LibMain)
target_link_libraries(js PRIVATE LibCrypto LibJS LibLine LibLocale LibMain LibTextCodec)
link_with_locale_data(js)
target_link_libraries(json PRIVATE LibMain)
target_link_libraries(kcov-example PRIVATE LibMain)
target_link_libraries(keymap PRIVATE LibKeyboard LibMain)
target_link_libraries(kill PRIVATE LibMain)
target_link_libraries(killall PRIVATE LibCore LibMain)
target_link_libraries(less PRIVATE LibMain)
target_link_libraries(ln PRIVATE LibMain)
target_link_libraries(logout PRIVATE LibMain)
target_link_libraries(ls PRIVATE LibMain)
target_link_libraries(lscpu PRIVATE LibMain)
target_link_libraries(lsirq PRIVATE LibMain)
target_link_libraries(lsof PRIVATE LibMain)
target_link_libraries(lsblk PRIVATE LibMain)
target_link_libraries(lspci PRIVATE LibPCIDB LibMain)
target_link_libraries(lsusb PRIVATE LibUSBDB LibMain)
target_link_libraries(man PRIVATE LibMarkdown LibMain)
target_link_libraries(markdown-check PRIVATE LibMarkdown LibMain)
target_link_libraries(matroska PRIVATE LibMain LibVideo)
target_link_libraries(md PRIVATE LibMarkdown LibMain)
target_link_libraries(mkdir PRIVATE LibMain)
target_link_libraries(mkfifo PRIVATE LibMain)
target_link_libraries(mknod PRIVATE LibMain)
target_link_libraries(mktemp PRIVATE LibMain)
target_link_libraries(mv PRIVATE LibMain)
target_link_libraries(mount PRIVATE LibMain)
target_link_libraries(nc PRIVATE LibMain)
target_link_libraries(netstat PRIVATE LibMain)
target_link_libraries(nl PRIVATE LibMain)
target_link_libraries(nologin PRIVATE LibMain)
target_link_libraries(notify PRIVATE LibGfx LibGUI LibMain)
target_link_libraries(nproc PRIVATE LibMain)
target_link_libraries(ntpquery PRIVATE LibMain)
target_link_libraries(open PRIVATE LibDesktop LibMain)
target_link_libraries(passwd PRIVATE LibCrypt LibMain)
target_link_libraries(paste PRIVATE LibGUI LibCore LibMain)
target_link_libraries(pathchk PRIVATE LibMain)
target_link_libraries(pgrep PRIVATE LibRegex LibMain)
target_link_libraries(pidof PRIVATE LibMain)
target_link_libraries(ping PRIVATE LibMain)
target_link_libraries(pkill PRIVATE LibRegex LibMain)
target_link_libraries(pledge PRIVATE LibMain)
target_link_libraries(pls PRIVATE LibCrypt LibMain)
target_link_libraries(pmap PRIVATE LibMain)
target_link_libraries(pmemdump PRIVATE LibMain)
target_link_libraries(printf PRIVATE LibMain)
target_link_libraries(pro PRIVATE LibMain LibProtocol)
target_link_libraries(profile PRIVATE LibMain)
target_link_libraries(ps PRIVATE LibMain)
target_link_libraries(purge PRIVATE LibMain)
target_link_libraries(pwd PRIVATE LibMain)
target_link_libraries(readelf PRIVATE LibMain)
target_link_libraries(readlink PRIVATE LibMain)
target_link_libraries(realpath PRIVATE LibMain)
target_link_libraries(reboot PRIVATE LibMain)
target_link_libraries(rev PRIVATE LibMain)
target_link_libraries(rm PRIVATE LibMain)
target_link_libraries(rmdir PRIVATE LibMain)
target_link_libraries(route PRIVATE LibMain)
target_link_libraries(run-tests PRIVATE LibRegex LibCoredump LibDebug LibMain)
target_link_libraries(seq PRIVATE LibMain)
target_link_libraries(shot PRIVATE LibGfx LibGUI LibIPC LibMain)
target_link_libraries(shuf PRIVATE LibMain)
target_link_libraries(shutdown PRIVATE LibMain)
target_link_libraries(sleep PRIVATE LibMain)
target_link_libraries(sort PRIVATE LibMain)
target_link_libraries(sql PRIVATE LibLine LibMain LibSQL LibIPC)
target_link_libraries(stat PRIVATE LibMain)
target_link_libraries(strace PRIVATE LibMain)
target_link_libraries(stty PRIVATE LibMain)
target_link_libraries(su PRIVATE LibCrypt LibMain)
target_link_libraries(sync PRIVATE LibMain)
target_link_libraries(syscall PRIVATE LibMain LibSystem)
target_link_libraries(sysctl PRIVATE LibMain)
target_link_libraries(tac PRIVATE LibMain)
target_link_libraries(tail PRIVATE LibMain)
target_link_libraries(tar PRIVATE LibMain LibArchive LibCompress)
target_link_libraries(tee PRIVATE LibMain)
target_link_libraries(telws PRIVATE LibProtocol LibLine LibMain)
target_link_libraries(test-bindtodevice PRIVATE LibMain)
target_link_libraries(test-fuzz PRIVATE LibCore LibGemini LibGfx LibHTTP LibIPC LibJS LibMarkdown LibRegex LibShell LibMain)
target_link_libraries(test-imap PRIVATE LibIMAP LibMain)
target_link_libraries(test-pthread PRIVATE LibThreading LibMain)
target_link_libraries(test-unveil PRIVATE LibMain)
target_link_libraries(test_env PRIVATE LibMain)
target_link_libraries(timezone PRIVATE LibMain)
target_link_libraries(top PRIVATE LibMain)
target_link_libraries(touch PRIVATE LibMain)
target_link_libraries(tr PRIVATE LibMain)
target_link_libraries(traceroute PRIVATE LibMain)
target_link_libraries(tree PRIVATE LibMain)
target_link_libraries(true PRIVATE LibMain)
target_link_libraries(truncate PRIVATE LibMain)
target_link_libraries(tt PRIVATE LibMain)
target_link_libraries(tty PRIVATE LibMain)
target_link_libraries(umount PRIVATE LibMain)
target_link_libraries(uname PRIVATE LibMain)
target_link_libraries(uniq PRIVATE LibMain)
target_link_libraries(unzip PRIVATE LibArchive LibCompress LibMain)
target_link_libraries(update-cpp-test-results PRIVATE LibCpp LibCore LibMain)
target_link_libraries(uptime PRIVATE LibMain)
target_link_libraries(useradd PRIVATE LibCrypt LibMain)
target_link_libraries(userdel PRIVATE LibMain)
target_link_libraries(usermod PRIVATE LibMain)
target_link_libraries(utmpupdate PRIVATE LibMain)
target_link_libraries(w PRIVATE LibMain)
target_link_libraries(wallpaper PRIVATE LibGfx LibGUI LibMain)
target_link_libraries(wasm PRIVATE LibMain LibWasm LibLine)
target_link_libraries(watch PRIVATE LibMain)
target_link_libraries(wc PRIVATE LibMain)
target_link_libraries(which PRIVATE LibMain)
target_link_libraries(whoami PRIVATE LibMain)
target_link_libraries(wsctl PRIVATE LibGUI LibIPC LibMain)
target_link_libraries(xargs PRIVATE LibMain)
target_link_libraries(xml PRIVATE LibMain LibXML)
target_link_libraries(yes PRIVATE LibMain)
target_link_libraries(zip PRIVATE LibArchive LibCompress LibCrypto LibMain)
|