Skip to content

Commit

Permalink
Fix handling of absolute install path params
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tobim committed Dec 15, 2024
1 parent 8371b40 commit 9d37252
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function(config_library target)

target_include_directories(${target} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

set_target_properties(${target} PROPERTIES
Expand Down
8 changes: 4 additions & 4 deletions libllhttp.pc.in
Original file line number Diff line number Diff line change
@@ -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}
Cflags: -I${includedir}

0 comments on commit 9d37252

Please sign in to comment.