Skip to content

Commit

Permalink
Avoid embedding the absolute install prefix in the artifacts
Browse files Browse the repository at this point in the history
Signed-off-by: Sean McGrath <[email protected]>

Signed-off-by: Sean McGrath <[email protected]>
  • Loading branch information
sdmcgrath committed Nov 20, 2024
1 parent 7048ab4 commit 1f6f862
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ install(FILES
"${CMAKE_BINARY_DIR}/${cmake_conf_version_file}"
DESTINATION ${CMAKE_CONFIG_INSTALL_DIR} COMPONENT cmake)

string(REGEX REPLACE "[^/]+" ".." RELATIVE_PATH_LIBDIR_TO_PREFIX "${CMAKE_INSTALL_LIBDIR}")

set(PKG_DESC "Console Bridge")
set(PKG_CB_LIBS "-l${PROJECT_NAME}")
set(pkg_conf_file "console_bridge.pc")
Expand Down
2 changes: 1 addition & 1 deletion console_bridge.pc.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was generated by CMake for @PROJECT_NAME@
prefix=@CMAKE_INSTALL_PREFIX@
prefix=${pcfiledir}/../@RELATIVE_PATH_LIBDIR_TO_PREFIX@
exec_prefix=${prefix}
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Expand Down

0 comments on commit 1f6f862

Please sign in to comment.