diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-03-19 23:04:57 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-03-21 08:25:11 -0700 |
commit | 7226d2e2221fc5cbe4044a83511c28d7db53d5b4 (patch) | |
tree | eadf98ace63ba804387a40e16582693efc5dc9ad | |
parent | ea01f3fd80710fa675a0fb97ae7c03fb3ff63af3 (diff) | |
download | meta-openembedded-7226d2e2221fc5cbe4044a83511c28d7db53d5b4.tar.gz |
redis-plus-plus: Use GNUInstallDirs in cmake
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 48 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus/0001-cmake-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallDirs.patch b/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus/0001-cmake-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallDirs.patch new file mode 100644 index 0000000000..9ce39f3f77 --- /dev/null +++ b/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus/0001-cmake-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallDirs.patch @@ -0,0 +1,45 @@ +From fbb13cdb0b3591616c3f77b6bc76e75af8906cda Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 19 Mar 2022 22:59:58 -0700 +Subject: [PATCH] cmake: Use CMAKE_INSTALL_LIBDIR from GNUInstallDirs + +makes it portable across platforms e.g. ppc64/linux uses usr/lib64 for +system libs + +Upstream-Status: Submitted [https://github.com/sewenew/redis-plus-plus/pull/344] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + CMakeLists.txt | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4f28ee4..8150f5c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -239,10 +239,12 @@ if(REDIS_PLUS_PLUS_BUILD_TEST) + add_subdirectory(test) + endif() + ++include(GNUInstallDirs) ++ + install(TARGETS ${REDIS_PLUS_PLUS_TARGETS} + EXPORT redis++-targets +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION bin + INCLUDES DESTINATION include) + +@@ -284,7 +286,7 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/redis++.pc.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake/redis++.pc" @ONLY) + + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/cmake/redis++.pc" +- DESTINATION "lib/pkgconfig") ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + + # All the Debian-specific cpack defines. + if(${CMAKE_VERSION} VERSION_GREATER 3.6) +-- +2.35.1 + diff --git a/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus_1.3.3.bb b/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus_1.3.3.bb index c135105f90..575443f0e5 100644 --- a/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus_1.3.3.bb +++ b/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus_1.3.3.bb @@ -4,7 +4,9 @@ SECTION = "libs" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" -SRC_URI = "git://github.com/sewenew/redis-plus-plus;branch=master;protocol=https" +SRC_URI = "git://github.com/sewenew/redis-plus-plus;branch=master;protocol=https \ + file://0001-cmake-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallDirs.patch \ + " SRCREV = "389ffdf9e72035ea2096b03cda7f4a6809ae6363" S = "${WORKDIR}/git" |