-
Notifications
You must be signed in to change notification settings - Fork 418
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
provide Findpigpio.cmake
#573
Comments
rursprung
added a commit
to rursprung/fhgr-mrproj2
that referenced
this issue
Apr 20, 2023
use CMake's [`ExternalProject`] functionality to pull in the [`pigpio`] library. we explicitly check out the latest release tag (instead of just the default branch) to ensure that we always have the same version. the installation directory is explicitly specified as otherwise it tries to install the library globally, which would require root access. as we only need it for our build we don't want to interfer with the rest of the system and don't need root. in the best case this would've been mostly provided by the library directly, but so far this isn't the case. two issues, joan2937/pigpio#572 and joan2937/pigpio#573 have been raised by me while implementing this to hopefully make this better in the future. [`ExternalProject`]: https://cmake.org/cmake/help/latest/module/ExternalProject.html [`pigpio`]: https://github.com/joan2937/pigpio
rursprung
added a commit
to rursprung/fhgr-mrproj2
that referenced
this issue
Apr 27, 2023
use CMake's [`ExternalProject`] functionality to pull in the [`pigpio`] library. we explicitly check out the latest release tag (instead of just the default branch) to ensure that we always have the same version. the installation directory is explicitly specified as otherwise it tries to install the library globally, which would require root access. as we only need it for our build we don't want to interfer with the rest of the system and don't need root. in the best case this would've been mostly provided by the library directly, but so far this isn't the case. two issues, joan2937/pigpio#572 and joan2937/pigpio#573 have been raised by me while implementing this to hopefully make this better in the future. [`ExternalProject`]: https://cmake.org/cmake/help/latest/module/ExternalProject.html [`pigpio`]: https://github.com/joan2937/pigpio
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
currently there's no easy way to automate the integration of pigpio into other cmake projects.
using
ExternalProject
i found a way to do it. for this i created acmake/Findpigpio.cmake
in my project with the following content:afterwards i could use this in my main
CMakeLists.txt
:i think it'd be great if this project could ship something like this (i'm not sure if this is the best/proper way of doing it) so that others can pull it in more easily.
The text was updated successfully, but these errors were encountered: