From 9d37252aa424eb9af1d2a83dfa83153bcc0cc27f Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Sun, 15 Dec 2024 11:18:46 +0100 Subject: [PATCH] Fix handling of absolute install path params When configuring CMake build trees with absolute paths for `CMAKE_INSTALL_INCLUDEDIR` and `CMAKE_INSTALL_LIBDIR` the exported and installed cmake targets and the pkg-config file contain wrong paths. --- CMakeLists.txt | 2 +- libllhttp.pc.in | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c077a233..fecb397c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,7 +49,7 @@ function(config_library target) target_include_directories(${target} PUBLIC $ - $ + $ ) set_target_properties(${target} PROPERTIES diff --git a/libllhttp.pc.in b/libllhttp.pc.in index 67d280a8..4ad300b7 100644 --- a/libllhttp.pc.in +++ b/libllhttp.pc.in @@ -1,10 +1,10 @@ prefix=@CMAKE_INSTALL_PREFIX@ -exec_prefix=@CMAKE_INSTALL_PREFIX@ -libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@ +exec_prefix=@CMAKE_INSTALL_FULL_BINDIR@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ Name: libllhttp Description: Node.js llhttp Library Version: @PROJECT_VERSION@ Libs: -L${libdir} -lllhttp -Cflags: -I${includedir} \ No newline at end of file +Cflags: -I${includedir}