Skip to content

Commit 7854db8

Browse files
committed
paho mqtt library checkout with specific tag and also fixes cmake syntax versions with own patch
Signed-off-by: ashish-jabble <[email protected]>
1 parent fcc074a commit 7854db8

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ others/S2OPC
1919
others/check-0.15.2.tar.gz
2020
others/check-0.15.2
2121
others/libexpat
22+
others/scripts/mqtt/paho.mqtt.c*
2223

2324
# Archived packages
2425
plugins/archive
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
2+
index e2b934a..9d5e9a0 100644
3+
--- a/src/CMakeLists.txt
4+
+++ b/src/CMakeLists.txt
5+
@@ -94,7 +94,7 @@ target_compile_definitions(paho-cpp-objs PRIVATE PAHO_MQTTPP_EXPORTS)
6+
target_compile_options(paho-cpp-objs PRIVATE
7+
$<$<CXX_COMPILER_ID:MSVC>:/W3>
8+
$<$<CXX_COMPILER_ID:Clang>:-Wall -Wextra -Wdocumentation>
9+
- $<$<NOT:$<CXX_COMPILER_ID:MSVC,Clang>>:-Wall -Wextra>
10+
+ $<$<NOT:$<OR:$<CXX_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:Clang>>>:-Wall -Wextra>
11+
)
12+
13+
## --- Build the shared library, if requested ---

others/scripts/mqtt/requirements.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ else
4949
echo "Requirements are not supported for platform: ${os_name} and having version: ${os_version}"
5050
fi
5151
rm -rf paho.mqtt.c
52-
git clone https://github.com/eclipse/paho.mqtt.c.git
52+
git clone --depth 1 --branch v1.3.13 https://github.com/eclipse/paho.mqtt.c.git
5353
cd paho.mqtt.c
5454
mkdir build
5555
cd build
@@ -61,8 +61,10 @@ cd ..
6161
cd ..
6262

6363
rm -rf paho.mqtt.cpp
64-
git clone https://github.com/eclipse/paho.mqtt.cpp
64+
git clone --depth 1 --branch v1.3.1 https://github.com/eclipse/paho.mqtt.cpp
6565
cd paho.mqtt.cpp
66+
cp ../scripts/mqtt/paho-mqtt-cpp.patch .
67+
git apply paho-mqtt-cpp.patch
6668
cmake -Bbuild -H. -DPAHO_BUILD_STATIC=ON -DPAHO_WITH_SSL=ON -DPAHO_BUILD_DOCUMENTATION=FALSE -DPAHO_BUILD_SAMPLES=FALSE
6769
sudo cmake --build build/ --target install
6870
sudo ldconfig

0 commit comments

Comments
 (0)