Skip to content

Commit 99d9df7

Browse files
committed
main, CMakeLists.txt: honour ENABLE_DFU option
1 parent ea8396e commit 99d9df7

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,14 @@ if (ENABLE_CMSISDAP)
510510
endif()
511511
endif(ENABLE_CMSISDAP)
512512

513+
# DFU
514+
if (ENABLE_DFU)
515+
add_definitions(-DENABLE_DFU=1)
516+
message("DFU support enabled")
517+
else()
518+
message("DFU support disabled")
519+
endif()
520+
513521
# dirtyJtag
514522
if (ENABLE_DIRTYJTAG)
515523
add_definitions(-DENABLE_DIRTYJTAG=1)

src/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
#include "common.hpp"
2222
#include "cxxopts.hpp"
2323
#include "device.hpp"
24+
#ifdef ENABLE_DFU
2425
#include "dfu.hpp"
26+
#endif
2527
#include "display.hpp"
2628
#include "efinix.hpp"
2729
#include "ftdispi.hpp"

0 commit comments

Comments
 (0)