diff --git a/CMakeLists.txt b/CMakeLists.txt index 3eb44b2..590a6c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/src/main.cpp b/src/main.cpp index 155396b..03fc9c2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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(args->ftdi_serial)) ("ftdi-channel", "FTDI chip channel number (channels 0-3 map to A-D)", cxxopts::value(args->ftdi_channel)) -#if defined(USE_UDEV) || defined(ENABLE_LIBGPIOD) +#if defined(USE_DEVICE_ARG) ("d,device", "device to use (/dev/ttyUSBx)", cxxopts::value(args->device)) #endif