Private
Public Access
2
0

cmake: add FTDI FT4222 support

Existing FTDI D2xx support is just for serial comms library
but FT4222 needs a different library for i2c operation.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Henry Bruce
2015-06-26 13:48:23 -07:00
committed by Brendan Le Foll
parent e353508e30
commit 1c9b87bfd3
6 changed files with 101 additions and 10 deletions

View File

@@ -48,7 +48,7 @@ if (ARMPLAT)
endif()
if (USBPLAT)
add_subdirectory(usb)
message (INFO " - Adding USB platforms")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSBPLAT=1")
find_package (Ftd2xx)
if (FTDID2xx)
@@ -59,9 +59,18 @@ if (USBPLAT)
message (WARNING " - Enabled FTDID2xx support but library not found")
endif ()
endif ()
find_package (Ftd4222)
if (FTDI4222)
if (${LIBFT4222_FOUND})
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFTDI4222=1")
set (mraa_LIBS ${mraa_LIBS} ${LIBFT4222_LIBRARIES})
else ()
message (WARNING " - Enabled FTDI4222 support but library not found")
endif ()
endif ()
add_subdirectory(usb)
endif ()
set (mraa_LIB_SRCS
${mraa_LIB_PLAT_SRCS_NOAUTO}
# autogenerated version file