Add aliases for the public libraries #3516
Open
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.
This makes things consistent between when glslang is installed and imported versus when it's included as nested CMake project. You can now use
glslang::glslang
in both cases instead of needing the non-namespaced version sometimes and the namespaced one other times.Resolves one of the problems discussed in #3509
Note: Some downstream projects may be using system-installed glslang as
glslang
instead ofglslang::glslang
, but this is fragile and isn't actually supposed to work - when passing an un-namespaced library name totarget_link_libraries
, if it's not an existing CMake target, CMake won't emit an error, and will fall back to just adding an extra linker flag like-lglslang
. If you've already got the right library directory enabled (which is likely if you're using the system package), then it'll look like it's working, but you won't get any of the extras like CMake automatically setting up the right transitive include directories.