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

Fix CMake module base filename #13

Merged

Conversation

bretbrownjr
Copy link
Contributor

This patch renames example.cmake to example-config.cmake. This fixes a bug in which find_package(example) fails to locate the CMake module shipped by this project.

See the upstream CMake documentation for find_package for details about which file basenames are accepted when searching for a CMake modules via find_package, but names like example.cmake are not on the search path and will not be discovered properly.

Using example-config.cmake resolves this issue.

This patch renames `example.cmake` to `example-config.cmake`. This
fixes a bug in which `find_package(example)` fails to locate the
CMake module shipped by this project.

See the upstream CMake documentation for `find_package` for details
about which file basenames are accepted when searching for a
CMake modules via `find_package`, but names like `example.cmake`
are not on the search path and will not be discovered properly.

Using `example-config.cmake` resolves this issue.
@bretbrownjr
Copy link
Contributor Author

This sort of bug is difficult to test meaningfully inside the repo. It generally shows up when using this library from another project via packaging. I am working on Conan support in bemanproject/beman#21, which is how this bug was discovered.

@bretbrownjr bretbrownjr merged commit 3742e50 into bemanproject:main Jul 2, 2024
12 checks passed
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

Successfully merging this pull request may close these issues.

3 participants