btzy / nativefiledialog-extended

Cross platform (Windows, Mac, Linux) native file dialog library with C and C++ bindings, based on mlabbe/nativefiledialog.
zlib License
698 stars 95 forks source link

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

Closed Phytolizer closed 4 months ago

Phytolizer commented 4 months ago

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.

btzy commented 4 months ago

Thanks, this seems good!