src/main: add specific -D to enable/disable --device arg
This commit is contained in:
parent
27d64e0248
commit
8f59294f45
|
|
@ -216,6 +216,10 @@ if (ENABLE_LIBGPIOD)
|
|||
message("libgpiod support enabled")
|
||||
endif(ENABLE_LIBGPIOD)
|
||||
|
||||
if (ENABLE_UDEV OR ENABLE_LIBGPIOD)
|
||||
add_definitions(-DUSE_DEVICE_ARG)
|
||||
endif(ENABLE_UDEV OR ENABLE_LIBGPIOD)
|
||||
|
||||
if (BUILD_STATIC)
|
||||
set_target_properties(openFPGALoader PROPERTIES LINK_SEARCH_END_STATIC 1)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -656,7 +656,7 @@ int parse_opt(int argc, char **argv, struct arguments *args, jtag_pins_conf_t *p
|
|||
|
||||
("ftdi-serial", "FTDI chip serial number", cxxopts::value<string>(args->ftdi_serial))
|
||||
("ftdi-channel", "FTDI chip channel number (channels 0-3 map to A-D)", cxxopts::value<int>(args->ftdi_channel))
|
||||
#if defined(USE_UDEV) || defined(ENABLE_LIBGPIOD)
|
||||
#if defined(USE_DEVICE_ARG)
|
||||
("d,device", "device to use (/dev/ttyUSBx)",
|
||||
cxxopts::value<string>(args->device))
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue