Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add conventional name for exported target
QtKeychain defines an exported CMake target (qt5keychain), but the name does not follow the CMake convention (Foo::Bar). This is confusing at best, especially given the name is the same as the plain library. It is not clear to the reader whether `target_link_libraries(foo PRIVATE qt5keychain)` links to an imported target or a plain library. Add an alias Qt5KeyChain::Qt5KeyChain with a more conventional name. This preserves compatibility for users that rely on the qt5keychain target.
- Loading branch information
70a567a
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.
This change breaks the build with CMake 3.17:
Ideally, qtkeychain should use proper export rather than hacks to inject aliases.
70a567a
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.
This requires CMake >= 18.0 with:
Kitware/CMake@056489d#diff-0e606b6054240c4fb56973e78d732b70c81ee16c00615af3ab08523313d78ac0
https://gitlab.kitware.com/cmake/cmake/-/issues/20641
Would be a version guard acceptable?
70a567a
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.
@nicolasfella Thought on
70a567a
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.
I have filed an issue here:
#209
Will you do a pull request with the suggested change?