From 39606968c62b0dfaea009b33c4a28ed2ce811402 Mon Sep 17 00:00:00 2001 From: afrind Date: Thu, 5 Mar 2026 09:25:34 -0500 Subject: [PATCH] Fix spurious ( ) in CORE_EXTRA_LIBS_DIRS when brotli is found 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. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d681a85c..6fc8bc64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,7 +79,7 @@ IF (BROTLI_DEC_FOUND AND BROTLI_ENC_FOUND) LIST(APPEND CORE_FILES lib/certificate_compression.c) LIST(APPEND CORE_EXTRA_LIBS ${BROTLI_DEC_LIBRARIES} ${BROTLI_ENC_LIBRARIES}) - LIST(APPEND CORE_EXTRA_LIBS_DIRS (${BROTLI_DEC_LIBRARY_DIRS} ${BROTLI_ENC_LIBRARY_DIRS})) + LIST(APPEND CORE_EXTRA_LIBS_DIRS ${BROTLI_DEC_LIBRARY_DIRS} ${BROTLI_ENC_LIBRARY_DIRS}) ENDIF () ADD_LIBRARY(picotls-core ${CORE_FILES})