-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
40 lines (35 loc) · 1.31 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
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
include(RezBuild)
include(RezRepository)
include(ExternalProject)
# USD
rez_set_archive(
USD_URL usd/OpenUSD-${REZ_BUILD_PROJECT_VERSION}.tar.gz
https://github.com/PixarAnimationStudios/USD/archive/v${REZ_BUILD_PROJECT_VERSION}.tar.gz
)
# The environment variable REZ_TMP_PATH is meant to point to a location such as "/tmp/rez".
set(EXTRACT_DIR $ENV{REZ_TMP_PATH}/usd/${REZ_BUILD_PROJECT_VERSION})
set(BUILD_DIR ${EXTRACT_DIR}/build)
# We configure/build/install USD through the ExternalProject_Add macro,
# using three different shell scripts for each of these steps.
# If necessary, it is possible to skip one of these steps by replacing the command
# by "", an empty string.
ExternalProject_Add(
REZ_USD
URL ${USD_URL}
PREFIX usd
SOURCE_DIR ${EXTRACT_DIR}
PATCH_COMMAND ""
UPDATE_COMMAND ""
CONFIGURE_COMMAND bash ${CMAKE_SOURCE_DIR}/configure.sh ${EXTRACT_DIR} ${BUILD_DIR}
BUILD_COMMAND bash ${CMAKE_SOURCE_DIR}/build.sh ${BUILD_DIR}
INSTALL_COMMAND bash ${CMAKE_SOURCE_DIR}/install.sh ${BUILD_DIR}
)
# We use a bogus CMake "install" step in order to be able to properly finish
# and get out of the CMake script.
install(
CODE
"execute_process(
COMMAND echo \"\n[CMAKE] USD-${REZ_BUILD_PROJECT_VERSION} PACKAGE SETUP FINISHED!\n\"
)"
)