From 8b83e0f31b7d4b56718a634ebdbc22b18728d384 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 21 Jun 2020 17:23:08 +0100 Subject: feat(3p/nix): install pkgconfig files for libexpr, libmain and libstore Also fixes the pkgconfig files to use the corresponding CMake variables. Change-Id: I8095b8aff39ad91e592f3edc95555c9f1f1f153d Reviewed-on: https://cl.tvl.fyi/c/depot/+/545 Reviewed-by: tazjin --- third_party/nix/src/libmain/CMakeLists.txt | 3 +++ third_party/nix/src/libmain/nix-main.pc.in | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'third_party/nix/src/libmain') diff --git a/third_party/nix/src/libmain/CMakeLists.txt b/third_party/nix/src/libmain/CMakeLists.txt index 2520c85cc50a..a95128c1318f 100644 --- a/third_party/nix/src/libmain/CMakeLists.txt +++ b/third_party/nix/src/libmain/CMakeLists.txt @@ -26,5 +26,8 @@ target_link_libraries(nixmain glog ) +configure_file("nix-main.pc.in" "${PROJECT_BINARY_DIR}/nix-main.pc" @ONLY) +INSTALL(FILES "${PROJECT_BINARY_DIR}/nix-main.pc" DESTINATION "${PKGCONFIG_INSTALL_DIR}") + INSTALL(FILES ${HEADER_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nix/libmain) INSTALL(TARGETS nixmain DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/third_party/nix/src/libmain/nix-main.pc.in b/third_party/nix/src/libmain/nix-main.pc.in index 37b03dcd42c0..9876a3d1b7ae 100644 --- a/third_party/nix/src/libmain/nix-main.pc.in +++ b/third_party/nix/src/libmain/nix-main.pc.in @@ -1,9 +1,9 @@ -prefix=@prefix@ -libdir=@libdir@ -includedir=@includedir@ +prefix=@CMAKE_INSTALL_PREFIX@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ Name: Nix Description: Nix Package Manager Version: @PACKAGE_VERSION@ Libs: -L${libdir} -lnixmain -Cflags: -I${includedir}/nix -std=c++17 +Cflags: -I${includedir}/nix -- cgit 1.4.1