From 8d73e4f81c384c36e5ed3b8848253fd1e0b70692 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Fri, 21 Aug 2015 00:19:45 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CMakeLists.txt') 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}) -- cgit v1.2.3-70-g09d2