Use a single name for cmake find_package #210
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR that introduced the
find_packagecapabilities does not follow usual CMake conventions, namely:this PR introduces this, such the config and targets work for the following:
find_package(sqlite3mc)workstarget_link_libraries(xxx PRIVATE sqlite3mc::sqlite3mc_static)target_link_libraries(xxx PRIVATE sqlite3mc::sqlite3mc)This is in line with current CMake convention (one may want to consider having the
sqlite3mc::sqlite3mcbe an alias for the static recipe if the shared one is not available).By all means, feel free to disregard this PR altogether - it's just something that I noticed while reviewing conan-io/conan-center-index#27924. Lack of a namespace is relatively common (but not recommended), but the package having different names is rather unusual.