AcademySoftwareFoundation / AcademySoftwareFoundation/openvdb

[BUILD] cmake fails to configure vdb_tool when -DOPENVDB_TOOL_USE_EXR=ON

Open
#1,541 2 comments 1 reaction 2 assignees Claimed by @kmuseth View on GitHub
Dominant language
C++
Stars
3.4k
Forks
774
Avg merge
3d 9h
Merged PRs (30d)
34

Description

### Environment
**Operating System:** Gentoo 2.9
**Version / Commit SHA:** VDB 10.0.1
**CMake Version:** 3.25.1
**Compiler:** gcc 11

### Describe the problem
Trying to build the vdb_tool binary fails in cmake configuration, because it uses OpenEXR-2 library OpenEXR:IlmImf. Replacing the link line and using OpenEXR:OpenEXR as the link library for OpenEXR-3 let the tool be built. The error is:
```
-- Configuring done
CMake Error at openvdb_cmd/vdb_tool/CMakeLists.txt:96 (target_link_libraries):
The link interface of target "vdb_tool_common" contains:

OpenEXR::IlmImf

but the target was not found. Possible reasons include:

* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.

-- Generating done
```

### To Reproduce
Steps to reproduce the behavior:
1. Download the 10.0.1 release tarball from GitHub
2. Run CMake
```
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_DOCDIR=share/doc/openvdb-10.0.1/ -DOPENVDB_ABI_VERSION_NUMBER=10 -DOPENVDB_BUILD_DOCS=no -DOPENVDB_BUILD_UNITTESTS=yes -DOPENVDB_BUILD_VDB_LOD=yes -DOPENVDB_BUILD_VDB_RENDER=yes -DOPENVDB_BUILD_VDB_TOOL=yes -DOPENVDB_BUILD_VDB_VIEW=yes -DOPENVDB_CORE_SHARED=ON -DOPENVDB_CORE_STATIC=no -DOPENVDB_ENABLE_RPATH=OFF -DUSE_AX=no -DUSE_BLOSC=no -DUSE_CCACHE=OFF -DUSE_COLORED_OUTPUT=ON -DUSE_EXR=yes -DUSE_IMATH_HALF=ON -DUSE_LOG4CPLUS=ON -DUSE_NANOVDB=no -DUSE_PKGCONFIG=ON -DUSE_PNG=yes -DUSE_STATIC_DEPENDENCIES=no -DUSE_TBB=ON -DUSE_ZLIB=no -DBUILD_TEST=yes -DOPENVDB_BUILD_VDB_AX=no -DOPENVDB_TOOL_NANO_USE_BLOSC=OFF -DOPENVDB_TOOL_USE_ABC=OFF -DOPENVDB_TOOL_USE_EXR=ON -DOPENVDB_TOOL_USE_JPG=ON -DOPENVDB_TOOL_USE_NANO=no -DOPENVDB_TOOL_USE_PNG=ON -DOPENVDB_SIMD=AVX -DCMAKE_BUILD_TYPE=RelWithDebInfo
```
3. See error above

### Additional context
I removed the command line options for our toolchain file and initial cache from the above command for better readability. They don't have an influence on the outcome.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.