-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathFindlibFTD2XX.cmake
48 lines (39 loc) · 1.08 KB
/
FindlibFTD2XX.cmake
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
# Copyright 2009 SoftPLC Corporation http://softplc.com
# Dick Hollenbeck <[email protected]>
# License: GPL v2
#
# - Try to find libftd2xx
# Once done this will define
#
# LIBFTD2XX_FOUND - system has libftdi
# LIBFTD2XX_INCLUDE_DIR - the libftdi include directory
# LIBFTD2XX_LIBRARIES - Link these to use libftdi
if (NOT LIBFTD2XX_FOUND)
if(NOT WIN32)
include(FindPkgConfig)
pkg_check_modules(LIBFTD2XX_PKG libftd2xx)
endif(NOT WIN32)
find_path(LIBFTD2XX_INCLUDE_DIR
NAMES
ftd2xx.h
HINTS
${LIBFTD2XX_PKG_INCLUDE_DIRS}
PATHS
/usr/include
/usr/local/include
)
find_library(LIBFTD2XX_LIBRARIES
NAMES
ftd2xx
HINTS
${LIBFTD2XX_PKG_LIBRARY_DIRS}
PATHS
/usr/lib
/usr/local/lib
)
include(FindPackageHandleStandardArgs)
# handle the QUIETLY AND REQUIRED arguments AND set LIBFTD2XX_FOUND to TRUE if
# all listed variables are TRUE
find_package_handle_standard_args(LIBFTD2XX DEFAULT_MSG LIBFTD2XX_LIBRARIES LIBFTD2XX_INCLUDE_DIR)
#mark_as_advanced(LIBFTD2XX_INCLUDE_DIR LIBFTD2XX_LIBRARIES)
endif(NOT LIBFTD2XX_FOUND)