Private
Public Access
2
0

cmake: add -DFTDID2xx and use FindFtd2xx.cmake

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2015-06-26 13:44:38 +01:00
parent e170e21031
commit e353508e30
7 changed files with 119 additions and 5 deletions

View File

@@ -50,8 +50,16 @@ endif()
if (USBPLAT)
add_subdirectory(usb)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSBPLAT=1")
set (mraa_LIBS ${mraa_LIBS} ft4222)
endif()
find_package (Ftd2xx)
if (FTDID2xx)
if (${LIBFTD2XX_FOUND})
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFTDID2XX=1")
set (mraa_LIBS ${mraa_LIBS} ${LIBFTD2XX_LIBRARIES})
else ()
message (WARNING " - Enabled FTDID2xx support but library not found")
endif ()
endif ()
endif ()
set (mraa_LIB_SRCS