From: Punit Agrawal Date: Thu, 8 Apr 2021 01:38:10 +0000 (+0900) Subject: [PATCH 3/3] src/CMakeLists.txt: Enable multiarch for the cmake files X-Git-Tag: archive/raspbian/2.5-5+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=027344a42fc1460303876c47667c1093b4f07d85;p=target-factory.git [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 --- 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})