-
-
Notifications
You must be signed in to change notification settings - Fork 222
+ improve CMake-based package config files. #246
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
Conversation
@stefanofiorentino it looks good to me but could you review it too? |
I’ll check it later this week.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change request: I would spin-off the conan-related commit in an other PR.
I fully agree with the uvwConfig.cmake file installation along with the libs path.
As I cannot check all config/flags paths, I'm not 100% sure.
The CI/CD are green, though. ;) so I'll approve it once conan was stripped out or approved by @skypjack .
NOTE: the pkg-config related stuff was taken as is from libuv
I'm fine with the request from @stefanofiorentino I don't have a strong opinion here, so I follow him. 🙂 |
Previously, uvw provides only a pkg-config .pc file, although a uvw.cmake presents, it's not properly installed and placed in to a correct cmake `find_package` search path. This leads to many problems, where in this commit, a `uvw::uvw` ALIAS target is created for uvw static library, - if `BUILD_UVW_LIBS` is set, FETCH_LIBUV must be set as well (otherwise it'll not build, it's the current behavior). - if `BUILD_UVW_LIBS` is NOT set: - when `FETCH_LIBUV` is set, it's guaranteed that uv::uv-static target exists, so a genex is removed. - when `FETCH_LIBUV` is NOT set, it's the caller's responsibility to make sure libuv can be properly linked This commit also fixes CMake package config files for uvw, they are now installed as ${LIBDIR}/cmake/uvw/uvwConfig.cmake with target files for appropriate configuration (e.g. debug, release, etc...). Callers can now use `find_package(uvw)` and link with the `uvw::uvw` target to use uvw in their projects directly using CMake.
Hi all, I've just force pushed and removed that |
@skypjack should we put this into an experimental branch and let us time to be tried by someone else? |
I agree, I deleted my fork by accident :( , it'll be better if an experimental branch can be created, this also allows more people to test the changes. |
Makes sense. I would update |
It seems that a |
This dependency comes from |
I'd make users link it explicitly. |
I like when the linker breaks and I discover hidden dependencies. I feel the developers are playing fair with me. So we agreed. |
Close skypjack#246 Signed-off-by: Fiorentino Ing. Stefano <[email protected]>
Ciao, I've committed some more modifications to this PR here: experimental. |
@moodyhunter could you please try this and see if it finally solve your issue? |
Yeah, it seems to be good, all header-only, shared and static libraries are properly installed now. |
@stefanofiorentino I would merge this upstream. Any objection? |
No, I certainly agree. |
Let's proceed with this. I mean |
Close #246 Signed-off-by: Fiorentino Ing. Stefano <[email protected]>
CMake package config files for uvw, they are now installed as ${LIBDIR}/cmake/uvw/uvwConfig.cmake with target files for appropriate configuration (e.g. debug, release, etc...).
A
uvw::uvw
ALIAS target is created for uvw static library, to make persistency with what is done to the header-only version,Callers can now use
find_package(uvw)
and link with theuvw::uvw
target to use uvw in their projects directly using CMake.