From 8f9dc7eabe8d873c13ed8e9ba069afc18b1580ce Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Mon, 27 Jul 2020 16:54:16 +0200 Subject: [PATCH] Fixed installation of pkg-config file on other than Ubuntu distributions. Signed-off-by: Vitaly Zaitsev --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d5d0ae34..6c91ee67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,7 @@ set(NLOHMANN_JSON_CMAKE_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}") set(NLOHMANN_JSON_CMAKE_VERSION_CONFIG_FILE "${NLOHMANN_JSON_CMAKE_CONFIG_DIR}/${PROJECT_NAME}ConfigVersion.cmake") set(NLOHMANN_JSON_CMAKE_PROJECT_CONFIG_FILE "${NLOHMANN_JSON_CMAKE_CONFIG_DIR}/${PROJECT_NAME}Config.cmake") set(NLOHMANN_JSON_CMAKE_PROJECT_TARGETS_FILE "${NLOHMANN_JSON_CMAKE_CONFIG_DIR}/${PROJECT_NAME}Targets.cmake") +set(NLOHMANN_JSON_PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig") if (JSON_MultipleHeaders) set(NLOHMANN_JSON_INCLUDE_BUILD_DIR "${PROJECT_SOURCE_DIR}/include/") @@ -158,6 +159,6 @@ endif() ) install( FILES "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc" - DESTINATION lib/pkgconfig + DESTINATION ${NLOHMANN_JSON_PKGCONFIG_INSTALL_DIR} ) endif()