diff options
author | Anton Lundin <glance@acc.umu.se> | 2015-08-21 00:19:45 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-08-20 22:59:54 -0700 |
commit | 8d73e4f81c384c36e5ed3b8848253fd1e0b70692 (patch) | |
tree | e1860dd7367b1281211665f01dcfaacc397c6f54 /CMakeLists.txt | |
parent | e2c98def2699c6ed4b98633f780ef3faaf903335 (diff) | |
download | subsurface-8d73e4f81c384c36e5ed3b8848253fd1e0b70692.tar.gz |
Connect up serial_ftdi custom serial
This connects the serial_ftdi implementation to subsurface, and builds
libftdi1 for the android builds.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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}) |