Skip to content

cmake: fix Windows Houdini build — auto-detect openvdb_sesi and set OpenVDB search paths#2228

Open
KamalTD wants to merge 1 commit into
AcademySoftwareFoundation:masterfrom
KamalTD:fix/windows-openvdb-ax-static-shared-lib-collision
Open

cmake: fix Windows Houdini build — auto-detect openvdb_sesi and set OpenVDB search paths#2228
KamalTD wants to merge 1 commit into
AcademySoftwareFoundation:masterfrom
KamalTD:fix/windows-openvdb-ax-static-shared-lib-collision

Conversation

@KamalTD
Copy link
Copy Markdown

@KamalTD KamalTD commented Jun 7, 2026

Summary

On Windows, Houdini ships its OpenVDB library as openvdb_sesi.lib (and openvdb_sesi.dll) rather than openvdb.lib as used on Linux/macOS. FindOpenVDB searches only for the component name verbatim (openvdb), so Windows Houdini builds have silently required an undocumented manual cmake override:

```
-DOpenVDB_openvdb_LIBRARY=/custom/houdini/dsolib/openvdb_sesi.lib
```

Without it, find_package(OpenVDB) fails to locate the library and the build fails or links against a wrong copy.

Changes

cmake/OpenVDBHoudiniSetup.cmake — adds an OpenVDB section (alongside the existing TBB, Blosc, OpenEXR sections) that:

  • Sets OPENVDB_LIBRARYDIRHOUDINI_LIB_DIR so FindOpenVDB knows where to search without extra hints.
  • Sets OPENVDB_INCLUDEDIRHOUDINI_INCLUDE_DIR for consistency.
  • On Windows only: pre-sets OpenVDB_openvdb_LIBRARY by searching for openvdb_sesi first, then openvdb, in Houdini's dsolib directory.

Both hints respect existing user-provided values (guarded by if(NOT ...)), so they don't break custom setups.

Test environment

  • Windows 11, VS 2022 (MSVC 19.40)
  • Houdini 20.5.613 (OpenVDB 11.0.0, ABI 11)
  • LLVM 14.0.6 (conda-forge)
  • Boost 1.91 (vcpkg)

Before this change, cmake configure required the manual -DOpenVDB_openvdb_LIBRARY flag. After, the library is found automatically.

Checklist

  • Tested on Windows with Houdini 20.5.613
  • Guards against overriding user-set values
  • Does not affect Linux/macOS builds (the openvdb_sesi search is WIN32-guarded)

🤖 Generated with Claude Code

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Jun 7, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: KamalTD / name: KAMAL (a40a1e2)

…earch paths

On Windows, Houdini ships its OpenVDB library as openvdb_sesi.lib/dll
rather than openvdb.lib/dll (the name used on Linux/macOS). FindOpenVDB
searches only for the component name verbatim, so Windows Houdini builds
have always required the manual cmake flag:

  -DOpenVDB_openvdb_LIBRARY=<HFS>/custom/houdini/dsolib/openvdb_sesi.lib

Fix this by adding an OpenVDB section to OpenVDBHoudiniSetup.cmake that:
  - Sets OPENVDB_LIBRARYDIR/OPENVDB_INCLUDEDIR to Houdini's toolkit paths
    so FindOpenVDB knows where to look without extra hints.
  - On Windows, pre-sets OpenVDB_openvdb_LIBRARY by searching for both
    openvdb_sesi and openvdb names in Houdini's dsolib directory,
    eliminating the need for a manual command-line override.

Tested with Houdini 20.5.613 (OpenVDB 11.0.0, ABI 11) on Windows 11.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: KAMAL <m.kamalvfx@gmail.com>
@KamalTD KamalTD force-pushed the fix/windows-openvdb-ax-static-shared-lib-collision branch from a40a1e2 to cb44e6c Compare June 7, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant