diff options
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 0000000000..7cf9a8b121 --- /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 @@ | |||
| 1 | From 2a0dd2b300242230faa92cf8e26ccd70231bc9ef Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 19 Mar 2022 23:37:58 -0700 | ||
| 4 | Subject: [PATCH] cmake: Use CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_BINDIR | ||
| 5 | |||
| 6 | This ensures the install paths are not hardcoded. | ||
| 7 | |||
| 8 | Signed-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 | |||
| 14 | diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt | ||
| 15 | index 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}) | ||
| 33 | diff --git a/src/samples/CMakeLists.txt b/src/samples/CMakeLists.txt | ||
| 34 | index 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 | -- | ||
| 48 | 2.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 b5a6ac29c3..a9e16fa045 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 | ||
| 14 | SRC_URI = "git://github.com/eclipse/paho.mqtt.cpp;protocol=http;branch=master;protocol=https" | 14 | SRC_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 | " | ||
| 16 | SRCREV = "33921c8b68b351828650c36816e7ecf936764379" | 17 | SRCREV = "33921c8b68b351828650c36816e7ecf936764379" |
| 17 | 18 | ||
| 18 | DEPENDS = "openssl paho-mqtt-c" | 19 | DEPENDS = "openssl paho-mqtt-c" |
