CMake: add target_link_libraries internally
Makes it easier to include glslang in a larger CMake project---instead of having to call `target_link_libraries(glslang OSDependent OGLCompiler HLSL)`, for example, you only need to call `target_link_libraries(glslang)` and it will pull in the helpers it needs. This is also better in terms of cleaning up the "public interface", of sorts, for building glslang: end-users probably shouldn't need to know or be explicitly dependent on internal targets.
This commit is contained in:
parent
52fceb08f4
commit
6077a19ba3
3 changed files with 5 additions and 5 deletions
|
|
@ -82,6 +82,10 @@ set(HEADERS
|
|||
|
||||
add_library(glslang STATIC ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})
|
||||
set_property(TARGET glslang PROPERTY FOLDER glslang)
|
||||
target_link_libraries(glslang OGLCompiler OSDependent)
|
||||
if(ENABLE_HLSL)
|
||||
target_link_libraries(glslang HLSL)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
source_group("Public" REGULAR_EXPRESSION "Public/*")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue