-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathFindVideoInput.cmake
77 lines (63 loc) · 2.11 KB
/
FindVideoInput.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# - Find VideoInput
# Find the VideoInput includes and library
#
# VideoInput_INCLUDE_DIR - Where to find VideoInput includes
# VideoInput_LIBRARIES - List of libraries when using VideoInput
# VideoInput_FOUND - True if VideoInput was found
IF(VideoInput_INCLUDE_DIR)
SET(VideoInput_FIND_QUIETLY TRUE)
ENDIF(VideoInput_INCLUDE_DIR)
FIND_PATH(VideoInput_INCLUDE_DIR "videoInput.h"
PATHS
$ENV{VideoInput_HOME}/include
$ENV{EXTERNLIBS}/VideoInput/include
~/Library/Frameworks/include
/Library/Frameworks/include
/usr/local/include
/usr/include
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
/opt/include
DOC "VideoInput - Headers"
)
SET(VideoInput_NAMES videoInput videoInput.lib)
SET(VideoInput_DBG_NAMES videoInputD videoInputD.lib)
FIND_LIBRARY(VideoInput_LIBRARY NAMES ${VideoInput_NAMES}
PATHS
$ENV{VideoInput_HOME}
$ENV{EXTERNLIBS}/VideoInput
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib lib64
DOC "VideoInput - Library"
)
INCLUDE(FindPackageHandleStandardArgs)
IF(MSVC)
# VisualStudio needs a debug version
FIND_LIBRARY(VideoInput_LIBRARY_DEBUG NAMES ${VideoInput_DBG_NAMES}
PATHS
$ENV{VideoInput_HOME}/lib
$ENV{EXTERNLIBS}/VideoInput/lib
DOC "VideoInput - Library (Debug)"
)
IF(VideoInput_LIBRARY_DEBUG AND VideoInput_LIBRARY)
SET(VideoInput_LIBRARIES optimized ${VideoInput_LIBRARY} debug ${VideoInput_LIBRARY_DEBUG} )
ENDIF(VideoInput_LIBRARY_DEBUG AND VideoInput_LIBRARY)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VideoInput DEFAULT_MSG VideoInput_LIBRARY VideoInput_LIBRARY_DEBUG VideoInput_INCLUDE_DIR)
MARK_AS_ADVANCED(VideoInput_LIBRARY VideoInput_LIBRARY_DEBUG VideoInput_INCLUDE_DIR)
ELSE(MSVC)
# rest of the world
SET(VideoInput_LIBRARIES ${VideoInput_LIBRARY})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VideoInput DEFAULT_MSG VideoInput_LIBRARY VideoInput_INCLUDE_DIR)
MARK_AS_ADVANCED(VideoInput_LIBRARY VideoInput_INCLUDE_DIR)
ENDIF(MSVC)
IF(VideoInput_FOUND)
SET(VideoInput_INCLUDE_DIRS ${VideoInput_INCLUDE_DIR})
ENDIF(VideoInput_FOUND)