@@ -134,8 +134,10 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND AND TT_FONT_FILE)
DESTINATION ${_INSTALL_PREFIX}/bin/
COMPONENT kernelshark)
- execute_process(COMMAND bash "-c" "pkg-config --variable pc_path pkg-config | cut -f 1 -d: -z"
- OUTPUT_VARIABLE PKG_CONGIG_DIR)
+ if (NOT PKG_CONGIG_DIR)
+ execute_process(COMMAND bash "-c" "pkg-config --variable pc_path pkg-config | cut -f 1 -d: -z"
+ OUTPUT_VARIABLE PKG_CONGIG_DIR)
+ endif (NOT PKG_CONGIG_DIR)
install(FILES "${KS_DIR}/libkshark.pc"
DESTINATION ${PKG_CONGIG_DIR}
COMPONENT libkshark-devel)
On some distributions (e.g. NixOS), it is not possible to write files to directories owned by different packages. For this reason, we cannot always install libkshark.pc file to the directory reported by pkg-config. This commit allows to specify where to install the .pc file on cmake commandline via -DPKG_CONGIG_DIR=... When specified, automatic detection of .pc install directory is skipped. Signed-off-by: Michal Sojka <michal.sojka@cvut.cz> --- src/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)