-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
75 lines (62 loc) · 2.1 KB
/
CMakeLists.txt
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
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
include(RezBuild)
include(ExternalProject)
if(${MAYA_MAJOR_VERSION} EQUAL 2015)
set(arch_maya "")
set(ADLM_RELEASE R9)
elseif(${MAYA_MAJOR_VERSION} EQUAL 2016)
set(arch_maya "_64bit")
set(ADLM_RELEASE R11)
else()
set(arch_maya "_64bit")
set(ADLM_RELEASE R12)
endif()
configure_file(config/AdlmThinClientCustomEnv.xml.in AdlmThinClientCustomEnv.xml @ONLY)
configure_file(config/License.env.in License.env @ONLY)
set(syncfg_file Maya${MAYA_MAJOR_VERSION}.${MAYA_MAJOR_VERSION}.${MAYA_MINOR_VERSION}.64.syncfg)
set(MAYA_EXECUTABLE ${CMAKE_INSTALL_PREFIX}/maya/bin/maya.bin)
set(MAYA_WRAPPER ${CMAKE_INSTALL_PREFIX}/maya/bin/maya${MAYA_MAJOR_VERSION})
configure_file(config/synergy.syncfg.in ${syncfg_file} @ONLY)
configure_file(config/bin/maya.in bin/maya @ONLY)
configure_file(config/bin/register_maya.in bin/register_maya @ONLY)
set(url_maya ${CMAKE_CURRENT_SOURCE_DIR}/archives/Autodesk_Maya_${MAYA_MAJOR_VERSION}_EXT${MAYA_MINOR_VERSION}_SP${MAYA_PATCH_VERSION}_EN_Linux${arch_maya}.tgz)
set(build_cmd ${CMAKE_CURRENT_SOURCE_DIR}/extract.sh ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${MAYA_MAJOR_VERSION} )
if(${REZ_BUILD_INSTALL})
set(install_cmd ${CMAKE_CURRENT_SOURCE_DIR}/install.sh ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_INSTALL_PREFIX} ${MAYA_MAJOR_VERSION})
else()
set(install_cmd "")
endif()
ExternalProject_add(
maya
URL ${url_maya}
PREFIX maya
CONFIGURE_COMMAND ""
BUILD_COMMAND ${build_cmd}
INSTALL_COMMAND ${install_cmd}
BUILD_IN_SOURCE 0
)
rez_install_files(
${CMAKE_CURRENT_BINARY_DIR}/AdlmThinClientCustomEnv.xml
${CMAKE_CURRENT_BINARY_DIR}/${syncfg_file}
RELATIVE build/platform-linux
DESTINATION .
)
rez_install_files(
${CMAKE_CURRENT_BINARY_DIR}/License.env
RELATIVE build/platform-linux
DESTINATION maya/bin
)
rez_install_files(
config/license.lic
RELATIVE config
DESTINATION .
)
install(PROGRAMS
${CMAKE_CURRENT_BINARY_DIR}/bin/maya
${CMAKE_CURRENT_BINARY_DIR}/bin/register_maya
DESTINATION bin
)
rez_install_files(
cmake/maya.cmake
DESTINATION .
)