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:
committed by
Brendan Le Foll
parent
e353508e30
commit
1c9b87bfd3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user