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")
|
message("libgpiod support enabled")
|
||||||
endif(ENABLE_LIBGPIOD)
|
endif(ENABLE_LIBGPIOD)
|
||||||
|
|
||||||
|
if (ENABLE_UDEV OR ENABLE_LIBGPIOD)
|
||||||
|
add_definitions(-DUSE_DEVICE_ARG)
|
||||||
|
endif(ENABLE_UDEV OR ENABLE_LIBGPIOD)
|
||||||
|
|
||||||
if (BUILD_STATIC)
|
if (BUILD_STATIC)
|
||||||
set_target_properties(openFPGALoader PROPERTIES LINK_SEARCH_END_STATIC 1)
|
set_target_properties(openFPGALoader PROPERTIES LINK_SEARCH_END_STATIC 1)
|
||||||
endif()
|
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-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))
|
("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)",
|
("d,device", "device to use (/dev/ttyUSBx)",
|
||||||
cxxopts::value<string>(args->device))
|
cxxopts::value<string>(args->device))
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue