libcppkafka: Use CMAKE_INSTALL_LIBDIR instead of hardcoding lib

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2022-03-20 11:33:22 -07:00
parent 9ed7b69831
commit 7dc09c7aa5
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From 51ec4c1f533dee9a499490c1c5bbd23d2191a4a7 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 20 Mar 2022 11:14:25 -0700
Subject: [PATCH] cmake: Use CMAKE_INSTALL_LIBDIR
Do not hardcode library path, this helps it install in right location
independent of platforms, e.g. ppc64 uses lib64 and not lib
Upstream-Status: Submitted [https://github.com/mfontanini/cppkafka/pull/291]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c4e44e6..25ec1ce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,7 +51,7 @@ option(CPPKAFKA_EXPORT_CMAKE_CONFIG "Generate CMake config, target and version f
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
if (NOT CPPKAFKA_CONFIG_DIR)
- set(CPPKAFKA_CONFIG_DIR lib/cmake/${PROJECT_NAME})
+ set(CPPKAFKA_CONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
endif()
# Maintain previous compatibility
--
2.35.1

View File

@ -8,7 +8,9 @@ LIC_FILES_CHKSUM = " \
file://LICENSE;md5=d8b4ca15d239dc1485ef495c8f1bcc72 \ file://LICENSE;md5=d8b4ca15d239dc1485ef495c8f1bcc72 \
" "
SRC_URI = "git://github.com/mfontanini/cppkafka;protocol=https;branch=master" SRC_URI = "git://github.com/mfontanini/cppkafka;protocol=https;branch=master \
file://0001-cmake-Use-CMAKE_INSTALL_LIBDIR.patch \
"
SRCREV = "5e4b350806d561473138ce7a982e8f6cf2e77733" SRCREV = "5e4b350806d561473138ce7a982e8f6cf2e77733"
DEPENDS = "librdkafka boost chrpath-replacement-native" DEPENDS = "librdkafka boost chrpath-replacement-native"