Add aliases for the public libraries

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 https://github.com/KhronosGroup/glslang/issues/3509
This commit is contained in:
AnyOldName3 2024-02-14 16:38:44 +00:00 committed by arcady-lunarg
parent 02263efcd6
commit a92c61f845
2 changed files with 4 additions and 0 deletions

View file

@ -169,6 +169,7 @@ set(GLSLANG_HEADERS
Include/Types.h)
add_library(glslang ${LIB_TYPE} ${GLSLANG_SOURCES} ${GLSLANG_HEADERS})
add_library(glslang::glslang ALIAS glslang)
set_target_properties(glslang PROPERTIES
FOLDER glslang
POSITION_INDEPENDENT_CODE ON
@ -201,6 +202,7 @@ set(RESOURCELIMITS_HEADERS
)
add_library(glslang-default-resource-limits ${RESOURCELIMITS_SOURCES} ${RESOURCELIMITS_HEADERS})
add_library(glslang::glslang-default-resource-limits ALIAS glslang-default-resource-limits)
set_target_properties(glslang-default-resource-limits PROPERTIES
VERSION "${GLSLANG_VERSION}"
SOVERSION "${GLSLANG_VERSION_MAJOR}"