Repository navigation
fix(cmake): cvcConfig must find_dependency(assimp) when assimp is linked - #168
Merged
Merged
Conversation
When CVC_ENABLE_ASSIMP is on, cvcTargets.cmake puts assimp::assimp into
cvc::cvc's INTERFACE_LINK_LIBRARIES, but cvcConfig.cmake never told
consumers to resolve it. The first downstream find_package(cvc) then dies:
CMake Error at .../cvcTargets.cmake:61 (set_target_properties):
The link interface of target "cvc::cvc" contains:
assimp::assimp
but the target was not found.
which is what broke the cvcgl / pycvc / pycvc-gl steps of the release
publish leg while libcvc itself configured, built and packed fine.
cvcConfig.cmake.in already has exactly this guarded-find_dependency pattern
for OPENMP, IMAGEMAGICK, FFTW and CUDA; assimp was simply missed when the
loader landed (#158).
Scope is correct: the template is configured from src/cvc/CMakeLists.txt:996,
the same directory that does `set(CVC_ENABLE_ASSIMP OFF)` at line 682 when
assimp is absent, so @CVC_ENABLE_ASSIMP@ expands to the value actually used
for the build rather than the cached option default. Both branches behave:
assimp found -> find_dependency emitted; assimp missing -> omitted, matching
a link interface that has no assimp::assimp in it.
Not QUIET/optional on purpose. If assimp is in the link interface then a
consumer that cannot find it cannot link, so failing here names the actually
missing package instead of surfacing as a confusing missing-target error two
levels down in generated code.
transfix
force-pushed
the
fix/cvcconfig-find-assimp
branch
from
August 4, 2026 09:03
9f4108b to
e95ebf9
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.
When
CVC_ENABLE_ASSIMPis on,cvcTargets.cmakeputsassimp::assimpintocvc::cvc'sINTERFACE_LINK_LIBRARIES— butcvcConfig.cmakenever told consumers to resolve it. The first downstreamfind_package(cvc)then dies:How it surfaced
The
release/ubuntu-22.04leg ofpublish-cvcpkg(dry run).libcvcitself configured, built and packed fine — the failures were the family steps:Each of those is a separate CMake project doing
find_package(cvc)against the staged install, so each hit the unresolvable imported target.Fix
cvcConfig.cmake.inalready uses exactly this guarded-find_dependencypattern forOPENMP,IMAGEMAGICK,FFTWandCUDA. assimp was simply missed when the model loader landed (#158).Scope is correct (worth stating, since
option()creates a cache variable that a laterset()only shadows in directory scope): the template is configured fromsrc/cvc/CMakeLists.txt:996— the same directory that doesset(CVC_ENABLE_ASSIMP OFF)at line 682 when assimp is absent. So@CVC_ENABLE_ASSIMP@expands to the value actually used for the build, not the cached option default. Both branches behave:@CVC_ENABLE_ASSIMP@find_dependency(assimp)emitted — target resolvesassimp::assimpDeliberately not
QUIET/optional: if assimp is in the link interface, a consumer that cannot find it cannot link. Failing here names the actually-missing package instead of surfacing as a confusing missing-target error two levels down in generated code.Note on the 22.04 pin
This leg passed on
ubuntu-latest(24.04) on 2026-07-27 and fails onubuntu-22.04now, so #164's pin is what exposed it. I could not establish why 24.04 masked it — assimp6.0.5+cvc.2was published 21h before that run, so availability is not the difference — and I would rather say so than invent a reason. The omission is real and verifiable in the source either way, and this fix is correct independent of the mechanism.This blocks the real publish: the release leg is what produces the replacement
pycvc-glbundle needed to retire the glibc-2.38 one, so I did not run a live publish.