Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make boost an optional dependency of OpenUSD #3028

Closed
Closed
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ Dependencies
Required:
- C/C++ compiler
- [CMake](https://cmake.org/documentation/)
- [Boost](https://boost.org)
- [Intel TBB](https://www.threadingbuildingblocks.org/)

Optional:
- [Python](https://python.org)
- [Boost](https://boost.org)

See [3rd Party Library and Application Versions](VERSIONS.md) for version information.

Expand Down
7 changes: 5 additions & 2 deletions build_scripts/build_usd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,10 @@ def ForceBuildDependency(self, dep):

# Determine list of dependencies that are required based on options
# user has selected.
requiredDependencies = [ZLIB, BOOST, TBB]
requiredDependencies = [ZLIB, TBB]

if context.buildPython:
requiredDependencies += [BOOST]

if context.buildAlembic:
if context.enableHDF5:
Expand Down Expand Up @@ -2546,7 +2549,7 @@ def FormatBuildArguments(buildArgs):

# Ensure directory structure is created and is writable.
for dir in [context.usdInstDir, context.instDir, context.srcDir,
context.buildDir]:
context.buildDir, os.path.join(context.instDir, 'lib')]:
try:
if os.path.isdir(dir):
testFile = os.path.join(dir, "canwrite")
Expand Down
9 changes: 5 additions & 4 deletions cmake/defaults/Packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
set(PXR_THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")

# Find Boost package before getting any boost specific components as we need to
# disable boost-provided cmake config, based on the boost version found.
find_package(Boost REQUIRED)

if(PXR_ENABLE_PYTHON_SUPPORT OR PXR_ENABLE_OPENVDB_SUPPORT OR PXR_BUILD_OPENIMAGEIO_PLUGIN)
# Find Boost package before getting any boost specific components as we need to
# disable boost-provided cmake config, based on the boost version found.
find_package(Boost REQUIRED)
endif()
# Boost provided cmake files (introduced in boost version 1.70) result in
# inconsistent build failures on different platforms, when trying to find boost
# component dependencies like python, etc. Refer some related
Expand Down
Loading