blob: 0dc9f809b35c7ddc461189b5f49f48f9f3e78217 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# - Try to find D2XX
# Once done this will define
#
# D2XX_FOUND - system has FTDI
# D2XX_INCLUDE_DIR - the FTDI include directory
# D2XX_LIBRARIES - Link these to use FTDI
#
# N.B. You must include the file as following:
#
#include <ftd2xx.h>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if (D2XX_INCLUDE_DIR AND D2XX_LIBRARIES)
# in cache already
set(D2XX_FOUND TRUE)
message(STATUS "Found libfd2xx: ${D2XX_LIBRARIES}")
else (D2XX_INCLUDE_DIR AND D2XX_LIBRARIES)
find_path(D2XX_INCLUDE_DIR ftd2xx.h
#PATH_SUFFIXES libD2XX
${_obIncDir}
${GNUWIN32_DIR}/include
/usr/local/include
)
find_library(D2XX_LIBRARIES NAMES ftd2xx
PATHS
${_obLinkDir}
${GNUWIN32_DIR}/lib
/usr/local/lib
)
if(D2XX_INCLUDE_DIR AND D2XX_LIBRARIES)
set(D2XX_FOUND TRUE)
else (D2XX_INCLUDE_DIR AND D2XX_LIBRARIES)
set(D2XX_FOUND FALSE)
endif(D2XX_INCLUDE_DIR AND D2XX_LIBRARIES)
if (D2XX_FOUND)
if (NOT D2XX_FIND_QUIETLY)
message(STATUS "Found D2XX: ${D2XX_LIBRARIES}")
endif (NOT D2XX_FIND_QUIETLY)
else (D2XX_FOUND)
if (D2XX_FIND_REQUIRED)
message(FATAL_ERROR "D2XX not found. Please install libd2xx")
endif (D2XX_FIND_REQUIRED)
endif (D2XX_FOUND)
mark_as_advanced(D2XX_INCLUDE_DIR D2XX_LIBRARIES)
endif (D2XX_INCLUDE_DIR AND D2XX_LIBRARIES)
|