-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathFindMaya.cmake
67 lines (46 loc) · 1.48 KB
/
FindMaya.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
IF (WIN32)
# Maya plugins can only be compiled with msvc
IF (MSVC)
FIND_PATH(MAYA_INCLUDE_PATH maya/MTypes.h
PATHS
"$ENV{PROGRAMFILES}/Autodesk/Maya8.5/include"
"$ENV{MAYA_LOCATION}/include"
DOC "The directory where MTypes.h resides")
# Find maya version!
FIND_LIBRARY(MAYA_FOUNDATION_LIBRARY Foundation
PATHS
"$ENV{PROGRAMFILES}/Autodesk/Maya8.5/lib"
"$ENV{MAYA_LOCATION}/lib"
DOC "The directory where Foundation.lib resides")
FIND_LIBRARY(MAYA_OPENMAYA_LIBRARY OpenMaya
PATHS
"$ENV{PROGRAMFILES}/Autodesk/Maya8.5/lib"
"$ENV{MAYA_LOCATION}/lib"
DOC "The directory where OpenMaya.lib resides")
FIND_LIBRARY(MAYA_OPENMAYAANIM_LIBRARY OpenMayaAnim
PATHS
"$ENV{PROGRAMFILES}/Autodesk/Maya8.5/lib"
"$ENV{MAYA_LOCATION}/lib"
DOC "The directory where OpenMayaAnim.lib resides")
SET(MAYA_LIBRARIES
${MAYA_FOUNDATION_LIBRARY}
${MAYA_OPENMAYA_LIBRARY}
${MAYA_OPENMAYAANIM_LIBRARY})
SET(MAYA_EXTENSION ".mll")
ENDIF (MSVC)
ELSE (WIN32)
# On linux, check gcc version.
# OSX and Linux
FIND_PATH(MAYA_INCLUDE_PATH maya/MTypes.h
PATHS
/usr/autodesk/maya/include
$ENV{MAYA_LOCATION}/include
DOC "The directory where MTypes.h resides")
# TODO
ENDIF (WIN32)
IF (MAYA_INCLUDE_PATH)
SET( MAYA_FOUND 1 CACHE STRING "Set to 1 if Maya is found, 0 otherwise")
ELSE (MAYA_INCLUDE_PATH)
SET( MAYA_FOUND 0 CACHE STRING "Set to 1 if Maya is found, 0 otherwise")
ENDIF (MAYA_INCLUDE_PATH)
MARK_AS_ADVANCED( MAYA_FOUND )