Skip to content

Commit

Permalink
jlanz/build improvements (#122)
Browse files Browse the repository at this point in the history
* Install setupHoudini.sh scripts

* Cleanup Rocky9 Houdini instructions

* Remove INTERFACE_INCLUDE_DIRECTORIES from build instructions

* macOS build updates

* Cleanup macOS preset/pxrTargets

* Clarify Rocky9 instructions
  • Loading branch information
Lanz, Jon (NBCUniversal) authored Dec 19, 2024
1 parent f64f176 commit 2adbc09
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 14 deletions.
8 changes: 4 additions & 4 deletions CMakeMacOSPresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
"inherits": "macos-environment",
"environment": {
"PREFIX_PXR" : "${sourceParentDir}/building/macOS/pxr-houdini",
"HOUDINI_INSTALL_DIR" : "/Applications/Houdini/Houdini19.5.805/Frameworks/Houdini.framework/Versions/19.5",
"PXR_LIB_PREFIX" : "$env{HOUDINI_INSTALL_DIR}/Libraries",
"PXR_INCLUDE_PREFIX" : "$env{HOUDINI_INSTALL_DIR}/Resources/toolkit/include",
"HOUDINI_INSTALL_DIR" : "/Applications/Houdini/Houdini20.0.751",
"PXR_LIB_PREFIX" : "$env{HOUDINI_INSTALL_DIR}/Frameworks/Houdini.framework/Versions/Current/Libraries",
"PXR_INCLUDE_PREFIX" : "$env{HOUDINI_INSTALL_DIR}/Frameworks/Houdini.framework/Versions/Current/Resources/toolkit/include",
"PXR_DEPS_PREFIX" : "$env{DEPS_ROOT}",
"PXR_BOOST_PYTHON_LIB" : "$env{HOUDINI_INSTALL_DIR}/Libraries/libhboost_python39-mt-a64.dylib"
"PXR_BOOST_PYTHON_LIB" : "$env{HOUDINI_INSTALL_DIR}/Frameworks/Houdini.framework/Versions/Current/Libraries/libhboost_python39-mt-a64.dylib"
},
"cacheVariables": {
"CMAKE_PREFIX_PATH": "$env{DEPS_ROOT};$env{PREFIX_PXR}",
Expand Down
1 change: 0 additions & 1 deletion building/Rocky9/pxr-houdini/pxrTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@ add_library(usdImagingGL SHARED IMPORTED)
set_target_properties(usdImagingGL PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "PXR_PYTHON_ENABLED=1"
INTERFACE_INCLUDE_DIRECTORIES "${_INCLUDE_PREFIX};${HPYTHONINC}"
INTERFACE_INCLUDE_DIRECTORIES "${HPYTHONINC}"
INTERFACE_LINK_LIBRARIES "gf;tf;plug;trace;vt;work;hio;garch;glf;hd;hdx;pxOsd;sdf;sdr;usd;usdGeom;usdHydra;usdShade;usdImaging;ar;${_BOOST_PYTHON_LIB};${HPYTHONLIB};/usr/lib64/libtbb${CMAKE_SHARED_LIBRARY_SUFFIX}"
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${HPYTHONINC};${_DEPS_PREFIX}/include"
)
Expand Down
6 changes: 3 additions & 3 deletions building/Rocky9/rocky9_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Once you have extracted the download contents, note the location of the header f
Note: If building for Houdini, you'll potentially need to make the following changes before proceeding:
* Edit source/openmoonray/CMakeLinuxPresets.json to update HOUDINI_INSTALL_DIR
* Edit source/openmoonray/scripts/Rocky9/setupHoudini.sh to update HOUDINI_PATH
* Edit source/openmoonray/building/Rocky9/pxr-houdini/pxrTargets.cmake to update HPYTHONLIB, HPYTHONINC and INTERFACE_INCLUDE_DIRECTORIES
* Edit source/openmoonray/building/Rocky9/pxr-houdini/pxrTargets.cmake to update HPYTHONLIB, HPYTHONINC if needed
```

---
Expand Down Expand Up @@ -84,8 +84,8 @@ Once you have extracted the download contents, note the location of the header f
HOUDINI:
Open a terminal and run:
```
cd ~
source pushd /opt/hfs20.0/; source houdini_setup; popd
cd /opt/hfs20.0 # location of houdini install
source houdini_setup
source /opt/MoonRay/source/openmoonray/scripts/Rocky9/setupHoudini.sh
houdini
```
Expand Down
2 changes: 1 addition & 1 deletion building/macOS/macOS_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Base requirements:
Note: If building for Houdini, you'll potentially need to make the following changes before proceeding:
* Edit source/openmoonray/CMakeMacOSPresets.json to update HOUDINI_INSTALL_DIR
* Edit source/openmoonray/scripts/macOS/setupHoudini.sh to update HOUDINI_PATH
* Edit source/openmoonray/building/macOS/pxr-houdini/pxrTargets.cmake to update HPYTHONLIB, HPYTHONINC and INTERFACE_INCLUDE_DIRECTORIES
* Edit source/openmoonray/building/macOS/pxr-houdini/pxrTargets.cmake to update HPYTHONLIB, HPYTHONINC
```

---
Expand Down
5 changes: 2 additions & 3 deletions building/macOS/pxr-houdini/pxrTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ cmake_policy(VERSION 2.6...3.21)
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)


SET(HPYTHONLIB /Applications/Houdini/Houdini19.5.805/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib)
SET(HPYTHONINC /Applications/Houdini/Houdini19.5.805/Frameworks/Python.framework/Versions/3.9/include/python3.9)
SET(HPYTHONLIB $ENV{HOUDINI_INSTALL_DIR}/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib)
SET(HPYTHONINC $ENV{HOUDINI_INSTALL_DIR}/Frameworks/Python.framework/Versions/3.9/include/python3.9)

# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_targetsDefined)
Expand Down
9 changes: 8 additions & 1 deletion scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@
# SPDX-License-Identifier: Apache-2.0

install(FILES setup.sh
DESTINATION scripts)
DESTINATION scripts)

install(FILES macOS/setupHoudini.sh
DESTINATION scripts/macOS)

install(FILES Rocky9/setupHoudini.sh
DESTINATION scripts/Rocky9)

2 changes: 1 addition & 1 deletion scripts/macOS/setupHoudini.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export MOONRAY_CLASS_PATH=${omr_install_dir}/shader_json
export ARRAS_SESSION_PATH=${omr_install_dir}/sessions
PXR_PLUGINPATH_NAME=${omr_install_dir}/plugin/pxr:${omr_install_dir}/plugin/usd/moonrayShaderDiscovery:${omr_install_dir}/plugin/usd/moonrayShaderParser
#export HOUDINI_DSO_ERROR=5
export HOUDINI_PATH=/Applications/Houdini/Houdini19.5.805/Frameworks/Houdini.framework/Versions/Current/Resources/houdini:${omr_install_dir}/houdini/:${omr_install_dir}/plugin/houdini
export HOUDINI_PATH=/Applications/Houdini/Houdini20.0.751/Frameworks/Houdini.framework/Versions/Current/Resources/houdini:${omr_install_dir}/houdini/:${omr_install_dir}/plugin/houdini

0 comments on commit 2adbc09

Please sign in to comment.