cmake: fix Windows Houdini build — auto-detect openvdb_sesi and set OpenVDB search paths#2228
Open
KamalTD wants to merge 1 commit into
Conversation
|
|
…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>
a40a1e2 to
cb44e6c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On Windows, Houdini ships its OpenVDB library as
openvdb_sesi.lib(andopenvdb_sesi.dll) rather thanopenvdb.libas used on Linux/macOS.FindOpenVDBsearches 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:OPENVDB_LIBRARYDIR→HOUDINI_LIB_DIRsoFindOpenVDBknows where to search without extra hints.OPENVDB_INCLUDEDIR→HOUDINI_INCLUDE_DIRfor consistency.OpenVDB_openvdb_LIBRARYby searching foropenvdb_sesifirst, thenopenvdb, 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
Before this change, cmake configure required the manual
-DOpenVDB_openvdb_LIBRARYflag. After, the library is found automatically.Checklist
openvdb_sesisearch isWIN32-guarded)🤖 Generated with Claude Code