我使用的EMQX cloud,客户端使用linux C SDK接入。编译 Paho MQTT 库没问题。但是cmake测试代码时报错。
如下:
ozg@ozg-virtual-machine:~/emqx$ ls
CMakeCache.txt CMakeFiles CMakeLists.txt main.c
ozg@ozg-virtual-machine:~/emqx$ cmake
Usage
cmake [options]
cmake [options]
Specify a source directory to (re-)generate a build system for it in the
current working directory. Specify an existing build directory to
re-generate its build system.
CMake Error at CMakeLists.txt:3 (find_package):
By not providing “Findeclipse-paho-mqtt-c.cmake” in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
“eclipse-paho-mqtt-c”, but CMake did not find one.
Could not find a package configuration file provided by
“eclipse-paho-mqtt-c” (requested version 1.3.12) with any of the following
names:
Add the installation prefix of “eclipse-paho-mqtt-c” to CMAKE_PREFIX_PATH
or set “eclipse-paho-mqtt-c_DIR” to a directory containing one of the above
files. If “eclipse-paho-mqtt-c” provides a separate development package or
SDK, be sure it has been installed.