1. 在目录paho-mqtt-c/cmake中新建文件toolchain.linux-arm11-hdaq.cmake
# path to compiler and utilities
# specify the cross compiler
SET(CMAKE_C_COMPILER aarch64-himix200-linux-gcc)
# Name of the target platform
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_PROCESSOR arm)
# Version of the system
SET(CMAKE_SYSTEM_VERSION 1)
2. 在paho-mqtt-c目录下新建build_arm目录并进入此目录,执行命令:
cmake .. -DPAHO_BUILD_STATIC=TRUE -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain.linux-arm11-hdaq.cmake