summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-03-19 23:41:11 -0700
committerKhem Raj <raj.khem@gmail.com>2022-03-21 08:25:11 -0700
commit34437d9a22de52551edfe02e75b05ef175ba2e10 (patch)
tree6241a5731ec3173b7ca5e071bef408e474beda0f
parent92900805f63d5bcc7b9a65979cfe62ff4bbef28f (diff)
downloadmeta-openembedded-34437d9a22de52551edfe02e75b05ef175ba2e10.tar.gz
paho-mqtt-cpp: Use CMAKE_INSTALL_LIBDIR in cmake
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp/0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch49
-rw-r--r--meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.2.0.bb5
2 files changed, 52 insertions, 2 deletions
diff --git a/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp/0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch b/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp/0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch
new file mode 100644
index 000000000..7cf9a8b12
--- /dev/null
+++ b/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp/0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch
@@ -0,0 +1,49 @@
1From 2a0dd2b300242230faa92cf8e26ccd70231bc9ef Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 19 Mar 2022 23:37:58 -0700
4Subject: [PATCH] cmake: Use CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_BINDIR
5
6This ensures the install paths are not hardcoded.
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 cmake/CMakeLists.txt | 4 ++--
11 src/samples/CMakeLists.txt | 4 ++--
12 2 files changed, 4 insertions(+), 4 deletions(-)
13
14diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
15index a9f8908..7eadc60 100644
16--- a/cmake/CMakeLists.txt
17+++ b/cmake/CMakeLists.txt
18@@ -11,7 +11,7 @@ export(EXPORT ${package_name}
19 FILE "${CMAKE_CURRENT_BINARY_DIR}/${package_name}Targets.cmake"
20 NAMESPACE ${package_name}::)
21
22-install(EXPORT ${package_name} DESTINATION lib/cmake/${package_name}
23+install(EXPORT ${package_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${package_name}
24 FILE ${package_name}Targets.cmake
25 NAMESPACE ${package_name}::)
26
27@@ -19,4 +19,4 @@ install(FILES
28 "${CMAKE_CURRENT_BINARY_DIR}/${package_name}Config.cmake"
29 FindPahoMqttC.cmake
30 "${CMAKE_CURRENT_BINARY_DIR}/${package_name}ConfigVersion.cmake"
31- DESTINATION lib/cmake/${package_name})
32+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${package_name})
33diff --git a/src/samples/CMakeLists.txt b/src/samples/CMakeLists.txt
34index 953f5dc..d26729a 100644
35--- a/src/samples/CMakeLists.txt
36+++ b/src/samples/CMakeLists.txt
37@@ -103,7 +103,7 @@ endif()
38
39 ## install binaries
40 install(TARGETS ${INSTALL_TARGETS} EXPORT PahoMqttCppSamples
41- RUNTIME DESTINATION bin
42- LIBRARY DESTINATION lib
43+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
44+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
45 )
46
47--
482.35.1
49
diff --git a/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.2.0.bb b/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.2.0.bb
index b5a6ac29c..a9e16fa04 100644
--- a/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.2.0.bb
+++ b/meta-oe/recipes-connectivity/paho-mqtt-cpp/paho-mqtt-cpp_1.2.0.bb
@@ -11,8 +11,9 @@ LIC_FILES_CHKSUM = " \
11 file://about.html;md5=dcde438d73cf42393da9d40fabc0c9bc \ 11 file://about.html;md5=dcde438d73cf42393da9d40fabc0c9bc \
12" 12"
13 13
14SRC_URI = "git://github.com/eclipse/paho.mqtt.cpp;protocol=http;branch=master;protocol=https" 14SRC_URI = "git://github.com/eclipse/paho.mqtt.cpp;protocol=http;branch=master;protocol=https \
15 15 file://0001-cmake-Use-CMAKE_INSTALL_LIBDIR-and-CMAKE_INSTALL_BIN.patch \
16"
16SRCREV = "33921c8b68b351828650c36816e7ecf936764379" 17SRCREV = "33921c8b68b351828650c36816e7ecf936764379"
17 18
18DEPENDS = "openssl paho-mqtt-c" 19DEPENDS = "openssl paho-mqtt-c"