Open boboxxd opened 2 weeks ago
Hi @boboxxd
Thanks for your report.
I was trying to reproduce but I encountered a few issues:
project()
in the CMakeLists.txt
I avoided those by commenting things out or modifying your CMakeLists.txt.
Then the main issue is that you are missing the CMakeDeps
generator. Add to your generate()
:
from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake, cmake_layout
...
def generate(self):
tc = CMakeToolchain(self)
tc.generate()
deps = CMakeDeps(self)
deps.generate()
And then with something like conan build .
you will see in the output:
-- Conan: Component target declared 'PahoMqttCpp::paho-mqttpp3-static'
-- Conan: Component target declared 'eclipse-paho-mqtt-c::paho-mqtt3as-static'
-- Conan: Component target declared 'OpenSSL::Crypto'
-- Conan: Component target declared 'OpenSSL::SSL'
-- Conan: Target declared 'openssl::openssl'
-- Conan: Target declared 'ZLIB::ZLIB'
which means it was found.
Please let me know if this helps.
What is your question?
conanfile.py as follows:
cmakelists.txt as follows:
question is
find_package(PahoMqttCpp REQUIRED)
cannot find. I used the conan v2Have you read the CONTRIBUTING guide?