-
Notifications
You must be signed in to change notification settings - Fork 743
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
CMake project not importable using find_package #715
Comments
Is anyone working on this currently? I've seen that multiple (faulty) pull requests have been denied for the Microsoft GSL. I suggest using a different name though, since CMake ships with a What's the state with the PR #708, it is still open and the CI build fails (but it seems not due to the |
Good point, I've no clue why the CI builds fail. Yes, probably not caused by the I'm currently quite busy. Probably won't have time to look into it until end of October. Btw. I also created a hunter package for MicrosoftGSL tags 1.0.0 and 2.0.0. |
I've never seen CMake namespaces with dots included, so instead of I do think things should be seperated (via multiple PRs):
Maybe I find some time implementing a working CMake config-file package build, but I can't promise. Points 2 and 3 are discussable. I suggest adding the support to upstream if possible. The alternative is using forks adding the package management support, which is bad imo. Point 1 is absolutely mandatory, though. |
Also, the config file should support usage from both installed tree (project installed externally or via ExternalProject_Add) and build tree (project included via FetchContent and add_subdirectory). |
We would also require this to produce a CMake package to be usable in our projects. I have been trying to dig around a bit, and it see the current linked #708 has been closed as a duplicate of still open #784. This last PR is all green, are there any specific problems to be addressed before merging it in? (asking because this issue has been tagged with help wanted) |
should be fixed since 3.0.0 |
I also implement find_package version support in #879 |
As far as I know this issue has been addressed by a few different PRs. Please reactivate this or file a new issue if there is still a problem with the current find_package logic. Thanks. |
Currently no GSLConfig.cmake file is installed so find_package can not be used with GSL.
Exporting the targets and having an install script is a crucial requirement for GSL to be used with CMake based package manager like hunter. Even without any package manager
find_package
is the most clean way to import dependencies in CMake.The CMakeLists.txt should be changed to include an export and install rule.
The text was updated successfully, but these errors were encountered: