cmake: Fix dependencies of newly-stubbed libraries

Some downstream projects may only link to e.g. the glslang::SPIRV
library and rely on transitive dependencies to pull in everything else.
To keep this working, the SPIRV and MachineIndependent library stubs are
now linked against the glslang library.
This commit is contained in:
Arcady Goldmints-Orlov 2024-08-27 18:45:57 -04:00 committed by arcady-lunarg
parent 5073d93ec4
commit b45d21b287
2 changed files with 3 additions and 2 deletions

View file

@ -110,11 +110,11 @@ if(WIN32 AND BUILD_SHARED_LIBS)
endif()
if(ENABLE_OPT)
target_link_libraries(SPIRV PRIVATE MachineIndependent PUBLIC SPIRV-Tools-opt)
target_link_libraries(SPIRV PRIVATE glslang PUBLIC SPIRV-Tools-opt)
target_include_directories(SPIRV PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>)
else()
target_link_libraries(SPIRV PRIVATE MachineIndependent)
target_link_libraries(SPIRV PRIVATE glslang)
endif()
if(WIN32)