From 93e93a87a99f9a8f91432fb4ad87ee752d36e5f2 Mon Sep 17 00:00:00 2001 From: Punit Agrawal Date: Thu, 8 Apr 2021 10:38:10 +0900 Subject: [PATCH] [PATCH 3/3] src/CMakeLists.txt: Enable multiarch for the cmake files The cmake files install path is hard coded which gets in the way of enabling multiarch. Fix this by respecting the standard CMAKE variable used to specify library install location. This variable gets used during package building to install the cmake files to multiarch aware location. Gbp-Pq: Name 0003-src-CMakeLists.txt-Enable-multiarch-for-the-cmake-fi.patch --- CMakeLists.txt | 4 ++-- src/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 47e881b..ae44325 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ endif() add_subdirectory(src) file(RELATIVE_PATH REL_INCLUDE_DIR - ${CMAKE_INSTALL_PREFIX}/share/cmake/${PROJECT_NAME} + ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ${CMAKE_INSTALL_PREFIX}/include) set(CONF_INCLUDE_DIRS "\${${PROJECT_NAME}_CMAKE_DIR}/${REL_INCLUDE_DIR}") @@ -45,7 +45,7 @@ write_basic_package_version_file( install(FILES "${CMAKE_BINARY_DIR}/${PROJECT_NAME}-config.cmake" "${CMAKE_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake" - DESTINATION share/cmake/${PROJECT_NAME}) + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) if(BUILD_TEST) add_subdirectory(test) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e231dfd..bde8d9d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -91,4 +91,4 @@ install( install( EXPORT ${PROJECT_NAME}-targets NAMESPACE ${PROJECT_NAME}:: - DESTINATION share/cmake/${PROJECT_NAME}) + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) -- 2.30.2