-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathFindVRPN.cmake
87 lines (73 loc) · 2.07 KB
/
FindVRPN.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
78
79
80
81
82
83
84
85
86
87
#
# Try to find VRPN library and include path.
# Once done this will define
#
# VRPN_FOUND
# VRPN_INCLUDE_DIR
# VRPN_LIBRARY
#
find_path(VRPN_INCLUDE_DIR vrpn_Tracker.h
PATHS
$ENV{EXTERNLIBS}/VRPN/include
/usr/local/include
/usr/include
/sw/include
/opt/local/include
DOC "The directory where vrpn_Tracker.h resides")
find_library(VRPN_VRPN_LIBRARY NAMES vrpns vrpn
PATHS
$ENV{EXTERNLIBS}/VRPN/lib
/usr/local
/usr
/sw
/opt/local
PATH_SUFFIXES lib lib64
DOC "The VRPN vrpn library")
find_library(VRPN_QUAT_LIBRARY NAMES quat
PATHS
$ENV{EXTERNLIBS}/VRPN/lib
/usr/local
/usr
/sw
/opt/local
PATH_SUFFIXES lib lib64
DOC "The VRPN quat library")
include(FindPackageHandleStandardArgs)
IF(MSVC)
# VisualStudio needs a debug version
FIND_LIBRARY(VRPN_VRPN_LIBRARY_DEBUG NAMES vrpnsD vrpnD
PATHS
$ENV{VRPN_HOME}/lib
$ENV{EXTERNLIBS}/VRPN/lib
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
DOC "VRPN - Library (Debug)"
)
find_library(VRPN_QUAT_LIBRARY_DEBUG NAMES quatD
PATHS
$ENV{EXTERNLIBS}/VRPN/lib
/usr/local
/usr
/sw
/opt/local
PATH_SUFFIXES lib lib64
DOC "The VRPN quat library (Debug)")
IF(VRPN_VRPN_LIBRARY_DEBUG AND VRPN_VRPN_LIBRARY)
SET(VRPN_LIBRARIES optimized ${VRPN_VRPN_LIBRARY} debug ${VRPN_VRPN_LIBRARY_DEBUG} optimized ${VRPN_QUAT_LIBRARY} debug ${VRPN_QUAT_LIBRARY_DEBUG})
ENDIF(VRPN_VRPN_LIBRARY_DEBUG AND VRPN_VRPN_LIBRARY)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VRPN DEFAULT_MSG VRPN_VRPN_LIBRARY VRPN_VRPN_LIBRARY_DEBUG VRPN_INCLUDE_DIR)
MARK_AS_ADVANCED(VRPN_VRPN_LIBRARY_DEBUG VRPN_VRPN_LIBRARY VRPN_QUAT_LIBRARY VRPN_QUAT_LIBRARY_DEBUG VRPN_INCLUDE_DIR)
ELSE(MSVC)
set(VRPN_LIBRARIES ${VRPN_VRPN_LIBRARY} ${VRPN_QUAT_LIBRARY})
find_package_handle_standard_args(VRPN DEFAULT_MSG VRPN_VRPN_LIBRARY VRPN_QUAT_LIBRARY VRPN_INCLUDE_DIR)
ENDIF(MSVC)
if(VRPN_FOUND)
set(VRPN_INCLUDE_DIRS ${VRPN_INCLUDE_DIR})
endif()