transport: tighten picoquic guard to require imported target#232
Open
gmarzot wants to merge 1 commit into
Open
transport: tighten picoquic guard to require imported target#232gmarzot wants to merge 1 commit into
gmarzot wants to merge 1 commit into
Conversation
picoquic_FOUND alone is not sufficient — upstream picoquic's picoquic-config.cmake sets picoquic_FOUND=TRUE but does not define the picoquic::picoquic-core IMPORTED target. With the previous guard the subdirectory got added but the subsequent target_link_libraries on picoquic::picoquic-core failed at generate time. Check the imported target directly. Closes #76.
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.
Closes #76.
Problem
moxygen/openmoq/transport/CMakeLists.txtguarded the pico transport subdirectory with:Upstream picoquic's cmake config (
picoquic-config.cmake) setspicoquic_FOUND=TRUEand populatespicoquic_LIBRARIESbut does not define thepicoquic::picoquic-coreIMPORTED target. So with a system-installed picoquic the guard passes, the subdirectory is added, andtarget_link_libraries(... picoquic::picoquic-core)then fails at generate time:Fix
Check the imported target directly:
This is the right check —
picoquic_FOUNDsays "some picoquic was found by the legacy variables" but not "the modern target was defined". FetchContent builds and openmoq's picoquic submodule both define the target so they continue to work.Impact
sudo mv /usr/local/lib/cmake/picoquic/picoquic-config.cmake{,.bak}) is no longer neededThis change is