linux MQTT库交叉编译

参考: paho.mqtt.c的Linux编译与交叉编译_paho.mqtt.c 编译_GodGPF的博客-CSDN博客
paho.mqtt.c的Linux编译与交叉编译_paho.mqtt.c 编译_GodGPF的博客-CSDN博客

cmake -Bbuild -H. -DPAHO_ENABLE_TESTING=OFF -DPAHO_BUILD_STATIC=ON \
    -DPAHO_WITH_SSL=OFF \
    -DPAHO_HIGH_PERFORMANCE=ON \
    -DCMAKE_INSTALL_PREFIX=./build/_install \
    -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc
    
cmake -Bbuild -H. \
    -DPAHO_BUILD_DOCUMENTATION=ON \
    -DPAHO_BUILD_SAMPLES=ON \
    -DPAHO_WITH_SSL=OFF \
    -DPAHO_BUILD_STATIC=ON \
    -DCMAKE_PREFIX_PATH=/home/majin/paho.mqtt.c-1.3.12/build/_install \
    -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ \
    -DCMAKE_INSTALL_PREFIX=./build/_install

# 


cmake .. DCMAKE_C_COMPILER=arm-linux-gnueabihf-g++  \
    -DCMAKE_INSTALL_PREFIX=/home/majin/paho.mqtt.cpp-1.2.0/target_arm \
    -DPAHO_MQTT_C_LIBRARIES=/home/winston/paho.mqtt.c/build_arm/install/lib/libpaho-mqtt3c.so.1.3.4  \
    -DPAHO_WITH_SSL=OFF  -DPAHO_BUILD_DOCUMENTATION=ON -DPAHO_BUILD_SAMPLES=ON -DPAHO_BUILD_STATIC=ON  -DCMAKE_PREFIX_PATH=/home/majin/paho.mqtt.c-1.3.12/target_arm/ -
 
# no openssl cpp
cmake cmake -Bbuild -H. ..  -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -DPAHO_WITH_SSL=OFF -DCMAKE_INSTALL_PREFIX=/home/majin/paho.mqtt.cpp-1.2.0/target_arm -DCMAKE_PREFIX_PATH=/home/majin/paho.mqtt.c-1.3.12/target_arm/

你可能感兴趣的:(linux MQTT库交叉编译)