about summary refs log tree commit diff
path: root/third_party
diff options
context:
space:
mode:
Diffstat (limited to 'third_party')
-rw-r--r--third_party/nix/CMakeLists.txt1
-rw-r--r--third_party/nix/src/libexpr/CMakeLists.txt3
-rw-r--r--third_party/nix/src/libexpr/nix-expr.pc.in8
-rw-r--r--third_party/nix/src/libmain/CMakeLists.txt3
-rw-r--r--third_party/nix/src/libmain/nix-main.pc.in8
-rw-r--r--third_party/nix/src/libstore/CMakeLists.txt3
-rw-r--r--third_party/nix/src/libstore/nix-store.pc.in8
7 files changed, 22 insertions, 12 deletions
diff --git a/third_party/nix/CMakeLists.txt b/third_party/nix/CMakeLists.txt
index 24de6824de45..f325f5a5d98b 100644
--- a/third_party/nix/CMakeLists.txt
+++ b/third_party/nix/CMakeLists.txt
@@ -9,6 +9,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 
 # Provide an output path for pkgconfig.
 include(GNUInstallDirs)
+set(PKGCONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
 
 # The following lines import CMake-native dependencies which may
 # contain useful definitions. Other dependencies are not treated
diff --git a/third_party/nix/src/libexpr/CMakeLists.txt b/third_party/nix/src/libexpr/CMakeLists.txt
index 4be3fc5475ea..02bedc46fd7f 100644
--- a/third_party/nix/src/libexpr/CMakeLists.txt
+++ b/third_party/nix/src/libexpr/CMakeLists.txt
@@ -76,5 +76,8 @@ target_link_libraries(nixexpr
   gccpp
 )
 
+configure_file("nix-expr.pc.in" "${PROJECT_BINARY_DIR}/nix-expr.pc" @ONLY)
+INSTALL(FILES "${PROJECT_BINARY_DIR}/nix-expr.pc" DESTINATION "${PKGCONFIG_INSTALL_DIR}")
+
 INSTALL(FILES ${HEADER_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nix/libexpr)
 INSTALL(TARGETS nixexpr DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/third_party/nix/src/libexpr/nix-expr.pc.in b/third_party/nix/src/libexpr/nix-expr.pc.in
index 80f7a492b1a1..99b0ae2c68ec 100644
--- a/third_party/nix/src/libexpr/nix-expr.pc.in
+++ b/third_party/nix/src/libexpr/nix-expr.pc.in
@@ -1,10 +1,10 @@
-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@
 Requires: nix-store bdw-gc
 Libs: -L${libdir} -lnixexpr
-Cflags: -I${includedir}/nix -std=c++17
+Cflags: -I${includedir}/nix
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
diff --git a/third_party/nix/src/libstore/CMakeLists.txt b/third_party/nix/src/libstore/CMakeLists.txt
index 7661e44e07d6..4bc7b8fd5db2 100644
--- a/third_party/nix/src/libstore/CMakeLists.txt
+++ b/third_party/nix/src/libstore/CMakeLists.txt
@@ -103,5 +103,8 @@ target_link_libraries(nixstore
   sodium
 )
 
+configure_file("nix-store.pc.in" "${PROJECT_BINARY_DIR}/nix-store.pc" @ONLY)
+INSTALL(FILES "${PROJECT_BINARY_DIR}/nix-store.pc" DESTINATION "${PKGCONFIG_INSTALL_DIR}")
+
 INSTALL(FILES ${HEADER_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nix/libstore)
 INSTALL(TARGETS nixstore DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/third_party/nix/src/libstore/nix-store.pc.in b/third_party/nix/src/libstore/nix-store.pc.in
index 6d67b1e03808..b204776b372a 100644
--- a/third_party/nix/src/libstore/nix-store.pc.in
+++ b/third_party/nix/src/libstore/nix-store.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} -lnixstore -lnixutil
-Cflags: -I${includedir}/nix -std=c++17
+Cflags: -I${includedir}/nix