-
Notifications
You must be signed in to change notification settings - Fork 944
/
options.cmake
528 lines (460 loc) · 15 KB
/
options.cmake
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
# ALL options.
#
option(RETDEC_DOC "Build public API documentation (requires Doxygen)." OFF)
option(RETDEC_TESTS "Build tests." OFF)
option(RETDEC_DEV_TOOLS "Build dev tools." OFF)
option(RETDEC_COMPILE_YARA "Compile YARA rules at installation." ON)
option(RETDEC_MSVC_STATIC_RUNTIME "Use a multi-threaded statically-linked runtime library." OFF)
option(RETDEC_USE_SYSTEM_CAPSTONE "Use Capstone installed in the system." OFF)
# Component options.
#
option(RETDEC_ENABLE_AR_EXTRACTOR "" OFF)
option(RETDEC_ENABLE_AR_EXTRACTORTOOL "" OFF)
option(RETDEC_ENABLE_BIN2LLVMIR "" OFF)
option(RETDEC_ENABLE_BIN2PAT "" OFF)
option(RETDEC_ENABLE_CAPSTONE2LLVMIR "" OFF)
option(RETDEC_ENABLE_CAPSTONE2LLVMIRTOOL "" OFF)
option(RETDEC_ENABLE_COMMON "" OFF)
option(RETDEC_ENABLE_CONFIG "" OFF)
option(RETDEC_ENABLE_CPDETECT "" OFF)
option(RETDEC_ENABLE_CTYPES "" OFF)
option(RETDEC_ENABLE_CTYPESPARSER "" OFF)
option(RETDEC_ENABLE_DEBUGFORMAT "" OFF)
option(RETDEC_ENABLE_DEMANGLER "" OFF)
option(RETDEC_ENABLE_DEMANGLERTOOL "" OFF)
option(RETDEC_ENABLE_FILEFORMAT "" OFF)
option(RETDEC_ENABLE_FILEINFO "" OFF)
option(RETDEC_ENABLE_GETSIG "" OFF)
option(RETDEC_ENABLE_IDR2PAT "" OFF)
option(RETDEC_ENABLE_LLVM_SUPPORT "" OFF)
option(RETDEC_ENABLE_LLVMIR_EMUL "" OFF)
option(RETDEC_ENABLE_LLVMIR2HLL "" OFF)
option(RETDEC_ENABLE_LOADER "" OFF)
option(RETDEC_ENABLE_MACHO_EXTRACTOR "" OFF)
option(RETDEC_ENABLE_MACHO_EXTRACTORTOOL "" OFF)
option(RETDEC_ENABLE_PAT2YARA "" OFF)
option(RETDEC_ENABLE_PATTERNGEN "" OFF)
option(RETDEC_ENABLE_PDBPARSER "" OFF)
option(RETDEC_ENABLE_PELIB "" OFF)
option(RETDEC_ENABLE_RETDEC "" OFF)
option(RETDEC_ENABLE_RETDEC_DECOMPILER "" OFF)
option(RETDEC_ENABLE_RETDECTOOL "" OFF)
option(RETDEC_ENABLE_RTTI_FINDER "" OFF)
option(RETDEC_ENABLE_SERDES "" OFF)
option(RETDEC_ENABLE_STACOFIN "" OFF)
option(RETDEC_ENABLE_STACOFINTOOL "" OFF)
option(RETDEC_ENABLE_UNPACKER "" OFF)
option(RETDEC_ENABLE_UNPACKERTOOL "" OFF)
option(RETDEC_ENABLE_UTILS "" OFF)
option(RETDEC_ENABLE_YARACPP "" OFF)
# Dependency options.
#
include(${PROJECT_SOURCE_DIR}/cmake/deps.cmake)
# Default: ALL build is enabled.
#
option(RETDEC_ENABLE_ALL "" ON)
# Convert target list in RETDEC_ENABLE to RETDEC_ENABLE_<component> flags.
#
macro(set_if_equal v string res)
if(${v} STREQUAL ${string})
set(${res} ON)
endif()
endmacro()
string(REPLACE "," ";" RETDEC_ENABLE "${RETDEC_ENABLE}")
foreach(t ${RETDEC_ENABLE})
set_if_equal(${t} "ar-extractor" RETDEC_ENABLE_AR_EXTRACTOR)
set_if_equal(${t} "ar-extractortool" RETDEC_ENABLE_AR_EXTRACTORTOOL)
set_if_equal(${t} "bin2llvmir" RETDEC_ENABLE_BIN2LLVMIR)
set_if_equal(${t} "bin2pat" RETDEC_ENABLE_BIN2PAT)
set_if_equal(${t} "capstone2llvmir" RETDEC_ENABLE_CAPSTONE2LLVMIR)
set_if_equal(${t} "capstone2llvmirtool" RETDEC_ENABLE_CAPSTONE2LLVMIRTOOL)
set_if_equal(${t} "common" RETDEC_ENABLE_COMMON)
set_if_equal(${t} "config" RETDEC_ENABLE_CONFIG)
set_if_equal(${t} "cpdetect" RETDEC_ENABLE_CPDETECT)
set_if_equal(${t} "ctypes" RETDEC_ENABLE_CTYPES)
set_if_equal(${t} "ctypesparser" RETDEC_ENABLE_CTYPESPARSER)
set_if_equal(${t} "debugformat" RETDEC_ENABLE_DEBUGFORMAT)
set_if_equal(${t} "demangler" RETDEC_ENABLE_DEMANGLER)
set_if_equal(${t} "demanglertool" RETDEC_ENABLE_DEMANGLERTOOL)
set_if_equal(${t} "fileformat" RETDEC_ENABLE_FILEFORMAT)
set_if_equal(${t} "fileinfo" RETDEC_ENABLE_FILEINFO)
set_if_equal(${t} "getsig" RETDEC_ENABLE_GETSIG)
set_if_equal(${t} "idr2pat" RETDEC_ENABLE_IDR2PAT)
set_if_equal(${t} "llvmir-emul" RETDEC_ENABLE_LLVMIR_EMUL)
set_if_equal(${t} "llvmir2hll" RETDEC_ENABLE_LLVMIR2HLL)
set_if_equal(${t} "loader" RETDEC_ENABLE_LOADER)
set_if_equal(${t} "extractor" RETDEC_ENABLE_MACHO_EXTRACTOR)
set_if_equal(${t} "extractortool" RETDEC_ENABLE_MACHO_EXTRACTORTOOL)
set_if_equal(${t} "pat2yara" RETDEC_ENABLE_PAT2YARA)
set_if_equal(${t} "patterngen" RETDEC_ENABLE_PATTERNGEN)
set_if_equal(${t} "pdbparser" RETDEC_ENABLE_PDBPARSER)
set_if_equal(${t} "pelib" RETDEC_ENABLE_PELIB)
set_if_equal(${t} "retdec" RETDEC_ENABLE_RETDEC)
set_if_equal(${t} "retde-decompiler" RETDEC_ENABLE_RETDEC_DECOMPILER)
set_if_equal(${t} "retdectool" RETDEC_ENABLE_RETDECTOOL)
set_if_equal(${t} "rtti-finder" RETDEC_ENABLE_RTTI_FINDER)
set_if_equal(${t} "serdes" RETDEC_ENABLE_SERDES)
set_if_equal(${t} "stacofin" RETDEC_ENABLE_STACOFIN)
set_if_equal(${t} "stacofintool" RETDEC_ENABLE_STACOFINTOOL)
set_if_equal(${t} "unpacker" RETDEC_ENABLE_UNPACKER)
set_if_equal(${t} "unpackertool" RETDEC_ENABLE_UNPACKERTOOL)
set_if_equal(${t} "utils" RETDEC_ENABLE_UTILS)
set_if_equal(${t} "yaracpp" RETDEC_ENABLE_YARACPP)
endforeach()
# If at least one RETDEC_ENABLE_<component> is set, disable RETDEC_ENABLE_ALL.
#
if (RETDEC_ENABLE_AR_EXTRACTOR
OR RETDEC_ENABLE_AR_EXTRACTORTOOL
OR RETDEC_ENABLE_BIN2LLVMIR
OR RETDEC_ENABLE_BIN2PAT
OR RETDEC_ENABLE_CAPSTONE2LLVMIR
OR RETDEC_ENABLE_CAPSTONE2LLVMIRTOOL
OR RETDEC_ENABLE_COMMON
OR RETDEC_ENABLE_CONFIG
OR RETDEC_ENABLE_CPDETECT
OR RETDEC_ENABLE_CTYPES
OR RETDEC_ENABLE_CTYPESPARSER
OR RETDEC_ENABLE_DEBUGFORMAT
OR RETDEC_ENABLE_DEMANGLER
OR RETDEC_ENABLE_DEMANGLERTOOL
OR RETDEC_ENABLE_FILEFORMAT
OR RETDEC_ENABLE_FILEINFO
OR RETDEC_ENABLE_GETSIG
OR RETDEC_ENABLE_IDR2PAT
OR RETDEC_ENABLE_LLVM_SUPPORT
OR RETDEC_ENABLE_LLVMIR_EMUL
OR RETDEC_ENABLE_LLVMIR2HLL
OR RETDEC_ENABLE_LOADER
OR RETDEC_ENABLE_MACHO_EXTRACTOR
OR RETDEC_ENABLE_MACHO_EXTRACTORTOOL
OR RETDEC_ENABLE_PAT2YARA
OR RETDEC_ENABLE_PATTERNGEN
OR RETDEC_ENABLE_PDBPARSER
OR RETDEC_ENABLE_PELIB
OR RETDEC_ENABLE_RETDEC
OR RETDEC_ENABLE_RETDEC_DECOMPILER
OR RETDEC_ENABLE_RETDECTOOL
OR RETDEC_ENABLE_RTTI_FINDER
OR RETDEC_ENABLE_SERDES
OR RETDEC_ENABLE_STACOFIN
OR RETDEC_ENABLE_STACOFINTOOL
OR RETDEC_ENABLE_UNPACKER
OR RETDEC_ENABLE_UNPACKERTOOL
OR RETDEC_ENABLE_UTILS
OR RETDEC_ENABLE_YARACPP)
set(RETDEC_ENABLE_ALL OFF)
endif()
# Enable chosen components.
# Whenever a component is directly using another component, it must be noted
# in here.
#
macro(set_if_at_least_one_set res)
foreach(v ${ARGN})
if(${${v}})
set(${res} ON)
break()
endif()
endforeach()
endmacro()
macro(set_if_all_set res)
set(r ON)
foreach(v ${ARGN})
if(NOT ${${v}})
set(r OFF)
break()
endif()
endforeach()
set(${res} ${r})
endmacro()
# src
# Executables - targets are not used anywhere.
set_if_at_least_one_set(RETDEC_ENABLE_AR_EXTRACTORTOOL
RETDEC_ENABLE_ALL)
set_if_at_least_one_set(RETDEC_ENABLE_BIN2PAT
RETDEC_ENABLE_ALL)
if(RETDEC_DEV_TOOLS)
set_if_at_least_one_set(RETDEC_ENABLE_CAPSTONE2LLVMIRTOOL
RETDEC_ENABLE_ALL)
endif()
if(RETDEC_DEV_TOOLS)
set_if_at_least_one_set(RETDEC_ENABLE_DEMANGLERTOOL
RETDEC_ENABLE_ALL)
endif()
set_if_at_least_one_set(RETDEC_ENABLE_FILEINFO
RETDEC_ENABLE_ALL)
set_if_at_least_one_set(RETDEC_ENABLE_GETSIG
RETDEC_ENABLE_ALL)
set_if_at_least_one_set(RETDEC_ENABLE_IDR2PAT
RETDEC_ENABLE_ALL)
set_if_at_least_one_set(RETDEC_ENABLE_MACHO_EXTRACTORTOOL
RETDEC_ENABLE_ALL)
set_if_at_least_one_set(RETDEC_ENABLE_PAT2YARA
RETDEC_ENABLE_ALL)
set_if_at_least_one_set(RETDEC_ENABLE_RETDEC_DECOMPILER
RETDEC_ENABLE_ALL)
if(RETDEC_DEV_TOOLS)
set_if_at_least_one_set(RETDEC_ENABLE_RETDECTOOL
RETDEC_ENABLE_ALL)
endif()
set_if_at_least_one_set(RETDEC_ENABLE_STACOFINTOOL
RETDEC_ENABLE_ALL)
set_if_at_least_one_set(RETDEC_ENABLE_UNPACKERTOOL
RETDEC_ENABLE_ALL)
# Libraries - order matters.
set_if_at_least_one_set(RETDEC_ENABLE_RETDEC
RETDEC_ENABLE_RETDEC_DECOMPILER
RETDEC_ENABLE_RETDECTOOL
RETDEC_ENABLE_ALL)
set_if_at_least_one_set(RETDEC_ENABLE_MACHO_EXTRACTOR
RETDEC_ENABLE_ALL
RETDEC_ENABLE_MACHO_EXTRACTORTOOL)
set_if_at_least_one_set(RETDEC_ENABLE_AR_EXTRACTOR
RETDEC_ENABLE_ALL
RETDEC_ENABLE_AR_EXTRACTORTOOL
RETDEC_ENABLE_FILEINFO)
set_if_at_least_one_set(RETDEC_ENABLE_BIN2LLVMIR
RETDEC_ENABLE_ALL
RETDEC_ENABLE_RETDEC)
set_if_at_least_one_set(RETDEC_ENABLE_LLVMIR2HLL
RETDEC_ENABLE_ALL
RETDEC_ENABLE_RETDEC)
set_if_at_least_one_set(RETDEC_ENABLE_UNPACKER
RETDEC_ENABLE_ALL
RETDEC_ENABLE_UNPACKERTOOL)
set_if_at_least_one_set(RETDEC_ENABLE_PATTERNGEN
RETDEC_ENABLE_ALL
RETDEC_ENABLE_BIN2PAT
RETDEC_ENABLE_PAT2YARA)
set_if_at_least_one_set(RETDEC_ENABLE_CAPSTONE2LLVMIR
RETDEC_ENABLE_ALL
RETDEC_ENABLE_BIN2LLVMIR
RETDEC_ENABLE_CAPSTONE2LLVMIRTOOL)
set_if_at_least_one_set(RETDEC_ENABLE_STACOFIN
RETDEC_ENABLE_ALL
RETDEC_ENABLE_BIN2LLVMIR
RETDEC_ENABLE_STACOFINTOOL)
set_if_at_least_one_set(RETDEC_ENABLE_CPDETECT
RETDEC_ENABLE_ALL
RETDEC_ENABLE_FILEINFO
RETDEC_ENABLE_BIN2LLVMIR
RETDEC_ENABLE_UNPACKERTOOL)
set_if_at_least_one_set(RETDEC_ENABLE_RTTI_FINDER
RETDEC_ENABLE_ALL
RETDEC_ENABLE_BIN2LLVMIR)
set_if_at_least_one_set(RETDEC_ENABLE_DEBUGFORMAT
RETDEC_ENABLE_ALL
RETDEC_ENABLE_BIN2LLVMIR)
set_if_at_least_one_set(RETDEC_ENABLE_DEMANGLER
RETDEC_ENABLE_ALL
RETDEC_ENABLE_BIN2LLVMIR
RETDEC_ENABLE_DEBUGFORMAT
RETDEC_ENABLE_DEMANGLERTOOL)
set_if_at_least_one_set(RETDEC_ENABLE_CTYPESPARSER
RETDEC_ENABLE_ALL
RETDEC_ENABLE_BIN2LLVMIR
RETDEC_ENABLE_DEMANGLER)
set_if_at_least_one_set(RETDEC_ENABLE_CTYPES
RETDEC_ENABLE_ALL
RETDEC_ENABLE_CTYPESPARSER)
set_if_at_least_one_set(RETDEC_ENABLE_PDBPARSER
RETDEC_ENABLE_DEBUGFORMAT)
set_if_at_least_one_set(RETDEC_ENABLE_LOADER
RETDEC_ENABLE_ALL
RETDEC_ENABLE_BIN2LLVMIR
RETDEC_ENABLE_DEBUGFORMAT
RETDEC_ENABLE_FILEINFO
RETDEC_ENABLE_RTTI_FINDER
RETDEC_ENABLE_STACOFIN
RETDEC_ENABLE_STACOFINTOOL
RETDEC_ENABLE_UNPACKER
RETDEC_ENABLE_UNPACKERTOOL)
set_if_at_least_one_set(RETDEC_ENABLE_FILEFORMAT
RETDEC_ENABLE_ALL
RETDEC_ENABLE_BIN2LLVMIR
RETDEC_ENABLE_CPDETECT
RETDEC_ENABLE_DEBUGFORMAT
RETDEC_ENABLE_FILEINFO
RETDEC_ENABLE_GETSIG
RETDEC_ENABLE_LOADER
RETDEC_ENABLE_PATTERNGEN
RETDEC_ENABLE_UNPACKERTOOL)
set_if_at_least_one_set(RETDEC_ENABLE_PELIB
RETDEC_ENABLE_FILEFORMAT
RETDEC_ENABLE_UNPACKERTOOL)
set_if_at_least_one_set(RETDEC_ENABLE_LLVM_SUPPORT
RETDEC_ENABLE_ALL
RETDEC_ENABLE_BIN2LLVMIR
RETDEC_ENABLE_LLVMIR2HLL)
set_if_at_least_one_set(RETDEC_ENABLE_CONFIG
RETDEC_ENABLE_ALL
RETDEC_ENABLE_BIN2LLVMIR
RETDEC_ENABLE_FILEINFO
RETDEC_ENABLE_LLVMIR2HLL
RETDEC_ENABLE_STACOFIN)
set_if_at_least_one_set(RETDEC_ENABLE_SERDES
RETDEC_ENABLE_ALL
RETDEC_ENABLE_CONFIG)
set_if_at_least_one_set(RETDEC_ENABLE_COMMON
RETDEC_ENABLE_ALL
RETDEC_ENABLE_BIN2LLVMIR
RETDEC_ENABLE_CAPSTONE2LLVMIR
RETDEC_ENABLE_CONFIG
RETDEC_ENABLE_DEBUGFORMAT
RETDEC_ENABLE_FILEFORMAT
RETDEC_ENABLE_LOADER
RETDEC_ENABLE_RTTI_FINDER
RETDEC_ENABLE_SERDES
RETDEC_ENABLE_STACOFIN)
set_if_at_least_one_set(RETDEC_ENABLE_UTILS
RETDEC_ENABLE_ALL
RETDEC_ENABLE_AR_EXTRACTOR
RETDEC_ENABLE_AR_EXTRACTORTOOL
RETDEC_ENABLE_BIN2LLVMIR
RETDEC_ENABLE_BIN2PAT
RETDEC_ENABLE_CAPSTONE2LLVMIRTOOL
RETDEC_ENABLE_CONFIG
RETDEC_ENABLE_COMMON
RETDEC_ENABLE_CTYPES
RETDEC_ENABLE_CTYPESPARSER
RETDEC_ENABLE_FILEFORMAT
RETDEC_ENABLE_FILEINFO
RETDEC_ENABLE_IDR2PAT
RETDEC_ENABLE_LLVM_SUPPORT
RETDEC_ENABLE_LLVMIR2HLL
RETDEC_ENABLE_LOADER
RETDEC_ENABLE_MACHO_EXTRACTOR
RETDEC_ENABLE_MACHO_EXTRACTORTOOL
RETDEC_ENABLE_CPDETECT
RETDEC_ENABLE_PATTERNGEN
RETDEC_ENABLE_RTTI_FINDER
RETDEC_ENABLE_STACOFIN
RETDEC_ENABLE_UNPACKERTOOL)
set_if_at_least_one_set(RETDEC_ENABLE_YARACPP
RETDEC_ENABLE_ALL
RETDEC_ENABLE_CPDETECT
RETDEC_ENABLE_FILEINFO
RETDEC_ENABLE_STACOFIN)
# tests
set_if_all_set(RETDEC_ENABLE_BIN2LLVMIR_TESTS
RETDEC_TESTS
RETDEC_ENABLE_BIN2LLVMIR)
set_if_all_set(RETDEC_ENABLE_CAPSTONE2LLVMIR_TESTS
RETDEC_TESTS
RETDEC_ENABLE_CAPSTONE2LLVMIR)
set_if_all_set(RETDEC_ENABLE_CONFIG_TESTS
RETDEC_TESTS
RETDEC_ENABLE_CONFIG)
set_if_all_set(RETDEC_ENABLE_CTYPES_TESTS
RETDEC_TESTS
RETDEC_ENABLE_CTYPES)
set_if_all_set(RETDEC_ENABLE_CTYPESPARSER_TESTS
RETDEC_TESTS
RETDEC_ENABLE_CTYPESPARSER)
set_if_all_set(RETDEC_ENABLE_DEMANGLER_TESTS
RETDEC_TESTS
RETDEC_ENABLE_DEMANGLER)
set_if_all_set(RETDEC_ENABLE_FILEFORMAT_TESTS
RETDEC_TESTS
RETDEC_ENABLE_FILEFORMAT)
set_if_all_set(RETDEC_ENABLE_LLVMIR_EMUL_TESTS
RETDEC_TESTS
RETDEC_ENABLE_LLVMIR_EMUL)
set_if_all_set(RETDEC_ENABLE_LLVMIR2HLL_TESTS
RETDEC_TESTS
RETDEC_ENABLE_LLVMIR2HLL)
set_if_all_set(RETDEC_ENABLE_LOADER_TESTS
RETDEC_TESTS
RETDEC_ENABLE_LOADER)
set_if_all_set(RETDEC_ENABLE_SERDES_TESTS
RETDEC_TESTS
RETDEC_ENABLE_SERDES)
set_if_all_set(RETDEC_ENABLE_UNPACKER_TESTS
RETDEC_TESTS
RETDEC_ENABLE_UNPACKER)
set_if_all_set(RETDEC_ENABLE_COMMON_TESTS
RETDEC_TESTS
RETDEC_ENABLE_COMMON)
set_if_all_set(RETDEC_ENABLE_UTILS_TESTS
RETDEC_TESTS
RETDEC_ENABLE_UTILS)
# src depending on tests
set_if_at_least_one_set(RETDEC_ENABLE_LLVMIR_EMUL
RETDEC_ENABLE_CAPSTONE2LLVMIR_TESTS)
# deps
set_if_at_least_one_set(RETDEC_ENABLE_AUTHENTICODE_PARSER
RETDEC_ENABLE_FILEFORMAT)
set_if_at_least_one_set(RETDEC_ENABLE_CAPSTONE
RETDEC_ENABLE_CAPSTONE2LLVMIR
RETDEC_ENABLE_STACOFIN)
set_if_at_least_one_set(RETDEC_ENABLE_ELFIO
RETDEC_ENABLE_FILEFORMAT)
set_if_at_least_one_set(RETDEC_ENABLE_GOOGLETEST
RETDEC_ENABLE_BIN2LLVMIR_TESTS
RETDEC_ENABLE_CAPSTONE2LLVMIR_TESTS
RETDEC_ENABLE_COMMON_TESTS
RETDEC_ENABLE_CONFIG_TESTS
RETDEC_ENABLE_CTYPES_TESTS
RETDEC_ENABLE_CTYPESPARSER_TESTS
RETDEC_ENABLE_DEMANGLER_TESTS
RETDEC_ENABLE_FILEFORMAT_TESTS
RETDEC_ENABLE_LLVMIR_EMUL_TESTS
RETDEC_ENABLE_LLVMIR2HLL_TESTS
RETDEC_ENABLE_LOADER_TESTS
RETDEC_ENABLE_SERDES_TESTS
RETDEC_ENABLE_UNPACKER_TESTS
RETDEC_ENABLE_UTILS_TESTS)
set_if_at_least_one_set(RETDEC_ENABLE_KEYSTONE
RETDEC_ENABLE_CAPSTONE2LLVMIRTOOL
RETDEC_ENABLE_CAPSTONE2LLVMIR_TESTS)
set_if_at_least_one_set(RETDEC_ENABLE_LLVM
RETDEC_ENABLE_AR_EXTRACTOR
RETDEC_ENABLE_BIN2LLVMIR
RETDEC_ENABLE_CAPSTONE2LLVMIR
RETDEC_ENABLE_DEMANGLER
RETDEC_ENABLE_FILEFORMAT
RETDEC_ENABLE_LLVM_SUPPORT
RETDEC_ENABLE_LLVMIR_EMUL
RETDEC_ENABLE_LLVMIR2HLL
RETDEC_ENABLE_MACHO_EXTRACTOR
RETDEC_ENABLE_CPDETECT
RETDEC_ENABLE_DEBUGFORMAT)
set_if_at_least_one_set(RETDEC_ENABLE_RAPIDJSON
RETDEC_ENABLE_AR_EXTRACTOR
RETDEC_ENABLE_AR_EXTRACTORTOOL
RETDEC_ENABLE_CONFIG
RETDEC_ENABLE_CTYPESPARSER
RETDEC_ENABLE_FILEINFO
RETDEC_ENABLE_MACHO_EXTRACTOR
RETDEC_ENABLE_MACHO_EXTRACTORTOOL
RETDEC_ENABLE_SERDES)
set_if_at_least_one_set(RETDEC_ENABLE_TINYXML2
RETDEC_ENABLE_TINYXML2
RETDEC_ENABLE_FILEINFO
RETDEC_ENABLE_CPDETECT)
set_if_at_least_one_set(RETDEC_ENABLE_VARIANT
RETDEC_ENABLE_UTILS)
set_if_at_least_one_set(RETDEC_ENABLE_YARA
RETDEC_ENABLE_YARACPP)
set_if_at_least_one_set(RETDEC_ENABLE_YARAMOD
RETDEC_ENABLE_BIN2PAT
RETDEC_ENABLE_IDR2PAT
RETDEC_ENABLE_PAT2YARA
RETDEC_ENABLE_PATTERNGEN)
set_if_at_least_one_set(RETDEC_ENABLE_TLSH
RETDEC_ENABLE_FILEFORMAT)
set_if_at_least_one_set(RETDEC_ENABLE_STB
RETDEC_ENABLE_FILEFORMAT)
# Support
set_if_at_least_one_set(RETDEC_ENABLE_SUPPORT_ORDINALS
RETDEC_ENABLE_BIN2LLVMIR)
set_if_at_least_one_set(RETDEC_ENABLE_SUPPORT_TYPES
RETDEC_ENABLE_BIN2LLVMIR)
set_if_at_least_one_set(RETDEC_ENABLE_SUPPORT_YARA_SIGNSRCH
RETDEC_ENABLE_RETDEC
RETDEC_ENABLE_FILEINFO)
set_if_at_least_one_set(RETDEC_ENABLE_SUPPORT_YARA_TOOLS
RETDEC_ENABLE_RETDEC
RETDEC_ENABLE_CPDETECT
RETDEC_ENABLE_FILEINFO)
set_if_at_least_one_set(RETDEC_ENABLE_SUPPORT_YARA_STATIC_CODE
RETDEC_ENABLE_RETDEC)