Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finding async_mqtt, CMake #135

Closed
rberlich opened this issue Feb 20, 2024 · 1 comment
Closed

Finding async_mqtt, CMake #135

rberlich opened this issue Feb 20, 2024 · 1 comment

Comments

@rberlich
Copy link

Hi there,
there does not seem to be a CMake-macro FindAsyncMQTT.cmake (or similar) that allows searching for the library? Before I try to invent such a macro -- is this an oversight from me?
Kind Regards,
Rüdiger

@redboltz
Copy link
Owner

When you make install async_mqtt, then /usr/local/lib/cmake/async_mqtt_iface/async_mqtt_ifaceConfig.cmake is generated.
NOTE: /usr/local/ is default. You can change the location.

Then, you can run your cmake as async_mqtt_iface_DIR=/usr/local/lib/cmake/ cmake ..

Your CMakeLists.txt should contain find_package(async_mqtt_iface REQUIRED)

The point is the library name is async_mqtt_iface.
I am not 100% sure but _iface seems to be a conventional suffix for header only library, so I added it.

By the way, you can install async_mqtt using vcpkg. The command is vcpkg install async-mqtt

The project name is async_mqtt, cmake library config name is async_mqtt_iface, and vcpkg port name is async-mqtt.
Sorry for the complex naming, but it is the result that I respect tools mannar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants