-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathFindDRACO.cmake
77 lines (63 loc) · 1.73 KB
/
FindDRACO.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 DRACO
# Find the DRACO includes and library
#
# DRACO_INCLUDE_DIR - Where to find DRACO includes
# DRACO_FOUND - True if DRACO was found
IF(DRACO_INCLUDE_DIR)
SET(DRACO_FIND_QUIETLY TRUE)
ENDIF(DRACO_INCLUDE_DIR)
FIND_PATH(DRACO_INCLUDE_DIR "draco/draco_features.h"
PATHS
$ENV{DRACO_HOME}/include
$ENV{EXTERNLIBS}/DRACO/include
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
DOC "DRACO - Headers"
)
SET(DRACO_NAMES draco)
SET(DRACO_DBG_NAMES dracod)
FIND_LIBRARY(DRACO_LIBRARY NAMES ${DRACO_NAMES}
PATHS
$ENV{DRACO_HOME}
$ENV{EXTERNLIBS}/DRACO
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib lib64
DOC "DRACO - Library"
)
INCLUDE(FindPackageHandleStandardArgs)
IF(MSVC)
# VisualStudio needs a debug version
FIND_LIBRARY(DRACO_LIBRARY_DEBUG NAMES ${DRACO_DBG_NAMES}
PATHS
$ENV{DRACO_HOME}
$ENV{EXTERNLIBS}/DRACO
PATH_SUFFIXES lib lib64
DOC "DRACO - Library (Debug)"
)
IF(DRACO_LIBRARY_DEBUG AND DRACO_LIBRARY)
SET(DRACO_LIBRARIES optimized ${DRACO_LIBRARY} debug ${DRACO_LIBRARY_DEBUG})
ENDIF(DRACO_LIBRARY_DEBUG AND DRACO_LIBRARY)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DRACO DEFAULT_MSG DRACO_LIBRARY DRACO_LIBRARY_DEBUG DRACO_INCLUDE_DIR)
MARK_AS_ADVANCED(DRACO_LIBRARY DRACO_LIBRARY_DEBUG DRACO_INCLUDE_DIR)
ELSE(MSVC)
# rest of the world
SET(DRACO_LIBRARIES ${DRACO_LIBRARY})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DRACO DEFAULT_MSG DRACO_LIBRARY DRACO_INCLUDE_DIR)
MARK_AS_ADVANCED(DRACO_LIBRARY DRACO_INCLUDE_DIR)
ENDIF(MSVC)
IF(DRACO_FOUND)
SET(DRACO_INCLUDE_DIRS ${DRACO_INCLUDE_DIR})
ENDIF(DRACO_FOUND)