File: FindlibFTD2XX.cmake

package info (click to toggle)
xc3sprog 0%2Bsvn795%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 8,800 kB
  • sloc: cpp: 15,983; ansic: 849; vhdl: 410; makefile: 3
file content (48 lines) | stat: -rw-r--r-- 1,102 bytes parent folder | download | duplicates (3)
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 <d...@softplc.com>
# 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)