Closed ZaychukAleksey closed 3 months ago
I can reproduce this error.
CMake Error in cmake/CMakeLists.txt:
export called with target "paho-mqttpp3" which requires target
"paho-mqtt3as" that is not in any export set.
But even with this error message, i can still compile the library by running cmake --build build
. I'm not sure why this message appears.
Yes, apologies. I should have marked the PAHO_WITH_MQTT_C
feature as experimental. It came in as a PR and I didn't fully test it before the release. There is a PR up on the Paho C repo and some updates in the repo here that should get it working better.
Hello , the build error is persistent and the cmake cant be completed
-ThinkPad-T16-Gen-1:~/paho.mqtt.cpp$ cmake -Bbuild -H. -DPAHO_WITH_MQTT_C=ON -DPAHO_BUILD_STATIC=ON -DPAHO_BUILD_DOCUMENTATION=ON -DPAHO_BUILD_SAMPLES=ON -- Paho C: Bundled CMake Error at CMakeLists.txt:60 (add_subdirectory): The source directory
/home/charanhs/paho.mqtt.cpp/src/externals/paho-mqtt-c
does not contain a CMakeLists.txt file.
CMake Error at CMakeLists.txt:64 (add_library): add_library cannot create ALIAS target "eclipse-paho-mqtt-c::paho-mqtt3a" because target "paho-mqtt3a" does not already exist.
CMake Error at CMakeLists.txt:66 (add_library): add_library cannot create ALIAS target "eclipse-paho-mqtt-c::paho-mqtt3as" because target "paho-mqtt3as" does not already exist.
-- Configuring incomplete, errors occurred! See also "/home/charanhs/paho.mqtt.cpp/build/CMakeFiles/CMakeOutput.log".
I was waiting for an update to the Paho C library to get the build issues cleaned up, but there hasn't been a release there in a while, so I reworked the build to just work with the existing C v3.1.13.
I think this should all be fixed in master now, though I still need to test on Windows and MacOS. Let me know if you still see a problem.
I believe (hope) this is fixed. If not, please re-open.
yields:
Which is definitely a bug in CmakeLists since that line should look like this:
But even after fixing the line, the build still fails with: