-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindLeapMotion.cmake
44 lines (39 loc) · 1.09 KB
/
FindLeapMotion.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
# This script locates the PERC SDK
# ------------------------------------
#
# usage:
# find_package(PERC ...)
#
# searches in LeapMotion_ROOT and usual locations
#
# Sets LeapMotion_INCLUDE_DIR, LeapMotion_LIBRARY_STATIC and LeapMotion_LIBRARY_DYNAMIC
set(LeapMotion_POSSIBLE_PATHS
${LeapMotion_DIR}
$ENV{LeapMotion_DIR}
)
find_path(LeapMotion_INCLUDE_DIR
NAMES Leap.h
PATH_SUFFIXES "include"
PATHS ${LeapMotion_POSSIBLE_PATHS}
)
find_library(LeapMotion_LIBRARY
NAMES Leap Leapd
PATH_SUFFIXES "lib/x86"
PATHS ${LeapMotion_POSSIBLE_PATHS}
)
set(CMAKE_FIND_LIBRARY_SUFFIXES_SAVE ${CMAKE_FIND_LIBRARY_SUFFIXES})
if (WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
elseif(APPLE)
else()
set(CMAKE_FIND_LIBRARY_SUFFIXES ".so")
endif()
find_library(LeapMotion_BINARY
NAMES Leap Leapd
PATH_SUFFIXES "lib/x86"
PATHS ${LeapMotion_POSSIBLE_PATHS}
)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SAVE})
find_package_handle_standard_args(LeapMotion
FOUND_VAR LeapMotion_FOUND
REQUIRED_VARS LeapMotion_LIBRARY LeapMotion_INCLUDE_DIR LeapMotion_BINARY)