Skip to content

Commit 122ed72

Browse files
sdmcgrathahcorde
andauthored
Avoid embedding the absolute install prefix in the artifacts (#98)
Signed-off-by: Sean McGrath <[email protected]> Co-authored-by: Alejandro Hernández Cordero <[email protected]>
1 parent d011d60 commit 122ed72

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ install(FILES
107107
"${CMAKE_BINARY_DIR}/${cmake_conf_version_file}"
108108
DESTINATION ${CMAKE_CONFIG_INSTALL_DIR} COMPONENT cmake)
109109

110+
string(REGEX REPLACE "[^/]+" ".." RELATIVE_PATH_LIBDIR_TO_PREFIX "${CMAKE_INSTALL_LIBDIR}")
111+
110112
set(PKG_DESC "Console Bridge")
111113
set(PKG_CB_LIBS "-l${PROJECT_NAME}")
112114
set(pkg_conf_file "console_bridge.pc")

console_bridge.pc.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file was generated by CMake for @PROJECT_NAME@
2-
prefix=@CMAKE_INSTALL_PREFIX@
2+
prefix=${pcfiledir}/../@RELATIVE_PATH_LIBDIR_TO_PREFIX@
33
exec_prefix=${prefix}
44
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
55
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@

0 commit comments

Comments
 (0)