Debian Codegraph @

cmake_modules/FindDC1394.cmake

raw
1 # - Try to find dc1394 library (version 2) and include files
2 # Once done this will define
3 #
4 # DC1394_FOUND - system has DC1394
5 # DC1394_INCLUDE_DIR - the DC1394 include directory
6 # DC1394_LIBRARIES - Link these to use DC1394
7
8 # Redistribution and use is allowed according to the terms of the BSD license.
9 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
10
11 if (DC1394_INCLUDE_DIR AND DC1394_LIBRARIES)
12
13 # in cache already
14 set(DC1394_FOUND TRUE)
15 message(STATUS "Found libdc1394: ${DC1394_LIBRARIES}")
16
17 else (DC1394_INCLUDE_DIR AND DC1394_LIBRARIES)
18
19 find_path(DC1394_INCLUDE_DIR control.h
20 PATH_SUFFIXES dc1394
21 ${_obIncDir}
22 ${GNUWIN32_DIR}/include
23 )
24
25 find_library(DC1394_LIBRARIES NAMES dc1394
26 PATHS
27 ${_obLinkDir}
28 ${GNUWIN32_DIR}/lib
29 )
30
31 if(DC1394_INCLUDE_DIR AND DC1394_LIBRARIES)
32 set(DC1394_FOUND TRUE)
33 else (DC1394_INCLUDE_DIR AND DC1394_LIBRARIES)
34 set(DC1394_FOUND FALSE)
35 endif(DC1394_INCLUDE_DIR AND DC1394_LIBRARIES)
36
37
38 if (DC1394_FOUND)
39 if (NOT DC1394_FIND_QUIETLY)
40 message(STATUS "Found DC1394: ${DC1394_LIBRARIES}")
41 endif (NOT DC1394_FIND_QUIETLY)
42 else (DC1394_FOUND)
43 if (DC1394_FIND_REQUIRED)
44 message(FATAL_ERROR "DC1394 not found. Please install libdc1394 development package.")
45 endif (DC1394_FIND_REQUIRED)
46 endif (DC1394_FOUND)
47
48 mark_as_advanced(DC1394_INCLUDE_DIR DC1394_LIBRARIES)
49
50 endif (DC1394_INCLUDE_DIR AND DC1394_LIBRARIES)