Skip to content

Fix spurious ( ) in CORE_EXTRA_LIBS_DIRS when brotli is found#587

Merged
kazuho merged 1 commit intoh2o:masterfrom
afrind:fix-brotli-link-dirs
Mar 15, 2026
Merged

Fix spurious ( ) in CORE_EXTRA_LIBS_DIRS when brotli is found#587
kazuho merged 1 commit intoh2o:masterfrom
afrind:fix-brotli-link-dirs

Conversation

@afrind
Copy link
Copy Markdown
Contributor

@afrind afrind commented Mar 5, 2026

LIST(APPEND ...) treats ( and ) as literal list elements, not grouping syntax. When libbrotlidec/libbrotlienc are found via pkg-config, CORE_EXTRA_LIBS_DIRS ends up containing bare "(" and ")" which are then passed to TARGET_LINK_DIRECTORIES, causing a CMake configure error.

Test plan: reproduced via moxygen's standalone build, which pulls picoquic (and transitively picotls) via CMake FetchContent. In that layout picotls source lives inside the build tree, so the relative path "(" resolves to a build-prefixed path and CMake raises a hard error. Installing libbrotli-dev/brotli triggers the bug; this fix resolves it.

I thought about making a CI here for picotls, but it would have been rather involved.

LIST(APPEND ...) treats ( and ) as literal list elements, not grouping
syntax. When libbrotlidec/libbrotlienc are found via pkg-config,
CORE_EXTRA_LIBS_DIRS ends up containing bare "(" and ")" which are then
passed to TARGET_LINK_DIRECTORIES, causing a CMake configure error.

Test plan: reproduced via moxygen's standalone build, which pulls
picoquic (and transitively picotls) via CMake FetchContent. In that
layout picotls source lives inside the build tree, so the relative
path "(" resolves to a build-prefixed path and CMake raises a hard
error. Installing libbrotli-dev/brotli triggers the bug; this fix
resolves it.
afrind referenced this pull request in private-octopus/picoquic Mar 13, 2026
Add a picoquic::picoquic-core alias and include picoquic-core and
picotls libraries in an installed CMake export set. This allows parent
projects that embed picoquic via FetchContent to link against the
namespaced target and re-export it cleanly to their own consumers.
@afrind
Copy link
Copy Markdown
Contributor Author

afrind commented Mar 14, 2026

@kazuho I think this may be needed to compile picoquic + picotls on some systems in certain modes after I made some changes in picoquic. Can you take a look?

@kazuho kazuho merged commit b84869f into h2o:master Mar 15, 2026
12 checks passed
@kazuho
Copy link
Copy Markdown
Member

kazuho commented Mar 15, 2026

Thank you, it did not make sense at all to have parens only here.

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.

2 participants