From 7f9be4c7dc4ba8639e13adc6857e97ec267c47e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Pecka?= Date: Tue, 2 Dec 2025 11:43:51 +0100 Subject: [PATCH] pkgconfig: add boost include headers path If nghttp2-asio was compiled with boost in a non-standard location, the generated pkg-config file did not include the boost include path, which could lead to compilation errors for projects depending on nghttp2-asio. --- CMakeLists.txt | 4 ++++ lib/libnghttp2_asio.pc.in | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4899a06..c59e357 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -303,6 +303,10 @@ set(prefix "${CMAKE_INSTALL_PREFIX}") set(exec_prefix "${CMAKE_INSTALL_PREFIX}") set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") +set(boost_cflags "") +foreach(dir IN LISTS Boost_INCLUDE_DIRS) + set(boost_cflags "${boost_cflags} -I${dir}") +endforeach() set(VERSION "${PACKAGE_VERSION}") # For init scripts and systemd service file (in contrib/) set(bindir "${CMAKE_INSTALL_FULL_BINDIR}") diff --git a/lib/libnghttp2_asio.pc.in b/lib/libnghttp2_asio.pc.in index ec4fbbb..c51f26c 100644 --- a/lib/libnghttp2_asio.pc.in +++ b/lib/libnghttp2_asio.pc.in @@ -30,4 +30,4 @@ Description: HTTP/2 C++ library URL: https://github.com/tatsuhiro-t/nghttp2 Version: @VERSION@ Libs: -L${libdir} -lnghttp2_asio -Cflags: -I${includedir} +Cflags: -I${includedir}@boost_cflags@