Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
build
install
build/
install/
build_venv/
imgui.ini
.vscode
.DS_Store
.DS_Store
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@
[submodule "vendors/glew"]
path = vendors/glew
url = https://github.com/Perlmint/glew-cmake.git
[submodule "vendors/OpenUSD"]
path = vendors/OpenUSD
url = https://github.com/PixarAnimationStudios/OpenUSD.git
[submodule "vendors/OpenSubdiv"]
path = vendors/OpenSubdiv
url = https://github.com/PixarAnimationStudios/OpenSubdiv.git
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(pxr REQUIRED)
find_package(OpenGL REQUIRED)
find_package(X11 REQUIRED)


add_subdirectory(vendors)

Expand Down
94 changes: 94 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
.PHONY: build


rhel_install_dep:
sudo dnf install -y libXt-devel

create_venv:
python3 -m venv build_venv
. ./build_venv/bin/activate ;\
pip install -r ./build_venv_pip.txt

build_open_subdiv:
cd ./vendors/OpenSubdiv/ && \
cmake -DCMAKE_INSTALL_PREFIX=./install \
-DCMAKE_PREFIX_PATH=./install \
-DCMAKE_BUILD_TYPE=Debug \
-DNO_EXAMPLES=ON \
-DNO_TUTORIALS=ON \
-DNO_REGRESSION=ON \
-DNO_DOC=ON \
-DNO_OMP=ON \
-DNO_CUDA=ON \
-DNO_OPENCL=ON \
-DNO_DX=ON \
-DNO_TESTS=ON \
-DNO_GLEW=ON \
-DNO_GLFW=ON \
-DNO_PTEX=ON \
-DNO_TBB=ON && \
cmake --build . --config Debug --target install -j 10

build_usd: create_venv
. ./build_venv/bin/activate ; \
cd ./vendors/OpenUSD/ && \
python \
./build_scripts/build_usd.py \
--build=./build \
--build-variant=release \
--prefer-safety-over-speed \
-v \
--no-tests \
--no-examples \
--no-tutorials \
--no-docs \
--no-python-docs \
--no-debug-python \
--no-ptex \
--no-draco \
--no-mayapy-tests \
--no-animx-tests \
--python \
--tools \
--usd-imaging \
--openvdb \
--usdview \
--usdview \
--no-prman \
--openimageio \
--opencolorio \
--alembic \
--hdf5 \
--materialx \
--embree \
./install

build_app:
mkdir -p build && \
cd build && \
cmake -Dpxr_DIR=./vendors/OpenUSD/install/ -DOpenSubdiv_DIR=./vendors/OpenSubdiv/install/lib64/cmake/OpenSubdiv -DCMAKE_INSTALL_PREFIX=../install .. && \
make && \
make install

build:
$(MAKE) create_venv
@if [ ! -d "./vendors/OpenUSD/install/" ]; then \
$(MAKE) build_usd; \
fi
@if [ ! -d "./vendors/OpenSubdiv/install/" ]; then \
$(MAKE) build_open_subdiv; \
fi

$(MAKE) build_app

clean_dep:
rm -rf ./vendors/OpenUSD/install/ && \
rm -rf ./vendors/OpenSubdiv/install/

clean:
rm -rf ./build_venv && \
rm -rf ./build && \
rm -rf ./install

run: build
LD_LIBRARY_PATH=./vendors/OpenUSD/install/lib:./vendors/OpenUSD/install/lib64:$LD_LIBRARY_PATH ./install/bin/ImGuiHydraEditor
5 changes: 5 additions & 0 deletions build_venv_pip.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PyOpenGL==3.1.9
PySide6==6.9.0
PySide6_Addons==6.9.0
PySide6_Essentials==6.9.0
shiboken6==6.9.0
1 change: 1 addition & 0 deletions vendors/OpenSubdiv
Submodule OpenSubdiv added at 7d0ab5
1 change: 1 addition & 0 deletions vendors/OpenUSD
Submodule OpenUSD added at 53d7d6