Skip to content

Build: Add alias target for dependent project CMake consumption#143

Merged
btzy merged 1 commit into
btzy:masterfrom
Phytolizer:master
Jul 5, 2024
Merged

Build: Add alias target for dependent project CMake consumption#143
btzy merged 1 commit into
btzy:masterfrom
Phytolizer:master

Conversation

@Phytolizer
Copy link
Copy Markdown
Contributor

@Phytolizer Phytolizer commented Jul 5, 2024

Add a target nfd::nfd as an alias for the library nfd.

This naming convention is common in other CMake projects. The presence of :: in the identifier results in fail-fast behavior; when a user calls target_link_libraries or similar, nfd::nfd MUST be an existing target at configure time, but nfd might have been a system library. As a result, the latter would appear to work until the linker fails to find a library by that name.

This is not a breaking change - plain nfd is still accessible.

This naming convention is common in other CMake projects. The presence
of `::` in the identifier results in fail-fast behavior; when a user
calls `target_link_libraries` or similar, `nfd::nfd` MUST be an existing
target at configure time, but `nfd` might have been a system library.
As a result, the latter would appear to work until the linker fails to
find a library by that name.

This is not a breaking change - plain `nfd` is still accessible.
@btzy
Copy link
Copy Markdown
Owner

btzy commented Jul 5, 2024

Thanks, this seems good!

@btzy btzy changed the title Add alias target for dependent project CMake consumption Build: Add alias target for dependent project CMake consumption Jul 5, 2024
@btzy btzy merged commit 7020935 into btzy:master Jul 5, 2024
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