Skip to content

feat: create cmake alias for consistent downstream usage - #522

Merged
sangelovic merged 1 commit into
Kistler-Group:masterfrom
Krzmbrzl:patch-1
Dec 31, 2025
Merged

feat: create cmake alias for consistent downstream usage#522
sangelovic merged 1 commit into
Kistler-Group:masterfrom
Krzmbrzl:patch-1

Conversation

@Krzmbrzl

Copy link
Copy Markdown
Contributor

At the moment, downstream projects will have to differentiate based off the way the obtained sdbus-c++ in CMake. If they use find_package, the target they have to use is SDBusCpp::sdbus-c++, whereas the target is merely sdbus-c++ if they use FetchContent (i.e. use without installation).

By creating an alias target, it is now always possible to use the DBusCpp::sdbus-c++ target regardless of how the library was obtained.

At the moment, downstream projects will have to differentiate based off the way the obtained sdbus-c++ in CMake. If they use `find_package`, the target they have to use is `SDBusCpp::sdbus-c++`, whereas the target is merely `sdbus-c++` if they use `FetchContent` (i.e. use without installation).

By creating an alias target, it is now always possible to use the `DBusCpp::sdbus-c++` target regardless of how the library was obtained.
@sangelovic

Copy link
Copy Markdown
Collaborator

@Krzmbrzl You are very right! Thanks for this update -- somehow I assumed that this alias had been implemented already :-)

@sangelovic
sangelovic merged commit 6715ef1 into Kistler-Group:master Dec 31, 2025
9 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.

2 participants