eclipse / paho.mqtt.c

An Eclipse Paho C client library for MQTT for Windows, Linux and MacOS. API documentation: https://eclipse.github.io/paho.mqtt.c/
https://eclipse.org/paho
Other
1.93k stars 1.08k forks source link

Issue with accepting eclipse-paho-mqtt-c in cmake #1456

Open luminarei23 opened 6 months ago

luminarei23 commented 6 months ago

Describe the bug Hi i have an issue after deploying the paho-mqtt-c in ubuntu i builded source with cmake and make then generated the eclipse-paho-mqtt-c files but when i try to include directory "eclipse-paho-mqtt-c::paho-mqtt3as" i am getting this error:

" Could not find a configuration file for package "eclipse-paho-mqtt-c" that is compatible with requested version "".

The following configuration files were considered but not accepted:

/usr/local/lib/cmake/eclipse-paho-mqtt-c/eclipse-paho-mqtt-cConfig.cmake, version: 1.3.13 (64bit)

"

i tried to set the find_package to latest version (1.3.13) but it didn't helped. Worth mentioning that i use my cmakelists to build for RPI Pico W. i would appreciate any hints because i already made a full circle building from source -> static linking -> break -> building from source and i can't overcome this issue.

Environment (please complete the following information):

icraggs commented 4 months ago

I'm not a CMake expert, so I'm not sure how to answer this, I haven't used this project as a package itself. @fpagliughi any help?

fpagliughi commented 2 months ago

Apologies, I just saw this...

I'm not sure what the issue might be. I will mention that there is no version specified for the library in the CMake files, in the currently release version (v1.3.13 and earlier). That has been fixed in the version sitting in the develop branch, but has not been released yet.

But you're not requesting a specific version of this library in your CMake file that you posted. If you did, I would guess, that might cause the problem - meaning if you specified a version number in find_package().

Does C11 have different linkage requirements? I see a set(CMAKE_C_STANDARD 11)

Sorry, I'm not sure. Just throwing out some ideas.