diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 92f9e94b2..7c74e3551 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,7 @@ option(FORCE_LIBSSH "force linking with libssh to workaround libgit2 bug" ON) option(SUBSURFACE_MOBILE "build the QtQuick version for mobile device" OFF) option(FBSUPPORT "allow posting to Facebook" ON) option(BTSUPPORT "enable support for QtBluetooth (requires Qt5.4 or newer)" ON) +option(FTDISUPPORT "enable support for libftdi based serial" OFF) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} @@ -118,6 +119,16 @@ if(NOT NO_MARBLE) endif() endif() +if(FTDISUPPORT) + message(STATUS "building with libftdi support") + pkg_config_library(LIBFTDI libftdi QUIET) + if (NOT LIBFTDI_FOUND) + pkg_config_library(LIBFTDI libftdi1 REQUIRED) + endif() + set(SERIAL_FTDI serial_ftdi.c) + add_definitions(-DSERIAL_FTDI) +endif() + if(NO_MARBLE) message(STATUS "building without marble widget support") add_definitions(-DNO_MARBLE) @@ -341,6 +352,7 @@ set(SUBSURFACE_CORE_LIB_SRCS divelogexportlogic.cpp qt-init.cpp qtserialbluetooth.cpp + ${SERIAL_FTDI} ${PLATFORM_SRC} ) source_group("Subsurface Core" FILES ${SUBSURFACE_CORE_LIB_SRCS}) |