Skip to contentSkip to conversation

cereal: Use GNUInstallDirs instead of hard wiring install directories

PATCH New Anton Blanchard 1 participant 1 message Aug 17, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cereal: Use GNUInstallDirs instead of hard wiring install directories

On a multilib setup cmake files should go into lib64.

---
 ...rs-instead-of-hard-wiring-install-di.patch | 37 +++++++++++++++++++
 .../libcereal/libcereal_1.3.0.bb              |  4 +-
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/libcereal/libcereal/0001-Use-GNUInstallDirs-instead-of-hard-wiring-install-di.patch
meta-oe/recipes-support/libcereal/libcereal/0001-Use-GNUInstallDirs-instead-of-hard-wiring-install-di.patch new file +37 -0
new file mode 100644
index 000000000..93114dadd
@@ -0,0 +1,37 @@
+From c9e60ed064aa2938f71f2cacf79f0bb337812bf8 Mon Sep 17 00:00:00 2001
+From: Anton Blanchard <[email protected]>
+Date: Tue, 17 Aug 2021 09:32:43 +1000
+Subject: [PATCH] Use GNUInstallDirs instead of hard wiring install directories
+
+On a multilib setup cmake files should go into lib64.
+
+Upstream-Status: Submitted [https://github.com/USCiLab/cereal/pull/710]
+---
+ CMakeLists.txt | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b97c1f59..ad574290 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -70,14 +70,15 @@ endif()
+ 
+ option(CEREAL_INSTALL "Generate the install target" ${CEREAL_MASTER_PROJECT})
+ if(CEREAL_INSTALL)
++    include(GNUInstallDirs)
+     include(CMakePackageConfigHelpers)
+ 
+     install(TARGETS cereal EXPORT ${PROJECT_NAME}Targets)
+-    install(DIRECTORY include/cereal DESTINATION include)
++    install(DIRECTORY include/cereal DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+ 
+     set(configFile ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake)
+     set(versionFile ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake)
+-    set(configInstallDestination lib/cmake/${PROJECT_NAME})
++    set(configInstallDestination ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
+ 
+     configure_package_config_file(
+         ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
+-- 
+2.31.1
+
meta-oe/recipes-support/libcereal/libcereal_1.3.0.bb +3 -1
index 26b27fa6e..6498bb367 100644
@@ -16,7 +16,9 @@ PROVIDES += "${PN}-dev"
 
 PV .= "+git${SRCPV}"
 SRCREV = "64f50dbd5cecdaba785217e2b0aeea3a4f1cdfab"
-SRC_URI = "git://github.com/USCiLab/cereal.git"
+SRC_URI = "git://github.com/USCiLab/cereal.git \
+           file://0001-Use-GNUInstallDirs-instead-of-hard-wiring-install-di.patch \
+           "
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
2.31.1