From a845e716e9c19a821b2ca6adea0cd52e82c88b5b Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Sat, 13 Nov 2021 20:48:59 +0000 Subject: [PATCH] fix pkg-config file and cmake one Forwarded: not needed, upstream reworked the cmake handling Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/yaml-cpp/+bug/1880419 Last-Update: 2020-05-26 Gbp-Pq: Name fix-pkg-config.patch --- CMakeLists.txt | 6 +++--- yaml-cpp-config.cmake.in | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 78f5221..75ac522 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -156,13 +156,13 @@ if (YAML_CPP_INSTALL) DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h") install(EXPORT yaml-cpp-targets - DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/yaml-cpp") + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/yaml-cpp") install(FILES "${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake" "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake" - DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/yaml-cpp") + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/yaml-cpp") install(FILES "${PROJECT_BINARY_DIR}/yaml-cpp.pc" - DESTINATION ${CMAKE_INSTALL_DATADIR}/pkgconfig) + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) endif() if(YAML_CPP_BUILD_TESTS) diff --git a/yaml-cpp-config.cmake.in b/yaml-cpp-config.cmake.in index 7b41e3f..988517b 100644 --- a/yaml-cpp-config.cmake.in +++ b/yaml-cpp-config.cmake.in @@ -5,7 +5,7 @@ # Compute paths get_filename_component(YAML_CPP_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -set(YAML_CPP_INCLUDE_DIR "@CONFIG_INCLUDE_DIRS@") +set(YAML_CPP_INCLUDE_DIR "@INCLUDE_INSTALL_ROOT_DIR@") # Our library dependencies (contains definitions for IMPORTED targets) include("${YAML_CPP_CMAKE_DIR}/yaml-cpp-targets.cmake") -- 2.30.2