Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: fix linking of stubbed libraries #3811

Merged
merged 1 commit into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions SPIRV/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ if(WIN32 AND BUILD_SHARED_LIBS)
endif()

if(ENABLE_OPT)
target_link_libraries(SPIRV PRIVATE glslang PUBLIC SPIRV-Tools-opt)
target_link_libraries(SPIRV INTERFACE glslang PUBLIC SPIRV-Tools-opt)
target_include_directories(SPIRV PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>)
else()
target_link_libraries(SPIRV PRIVATE glslang)
target_link_libraries(SPIRV INTERFACE glslang)
endif()

if(WIN32)
Expand Down
2 changes: 1 addition & 1 deletion glslang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ endif()
add_library(MachineIndependent STATIC stub.cpp)
set_property(TARGET MachineIndependent PROPERTY POSITION_INDEPENDENT_CODE ON)
set_property(TARGET MachineIndependent PROPERTY FOLDER glslang)
target_link_libraries(MachineIndependent PRIVATE glslang)
target_link_libraries(MachineIndependent INTERFACE glslang)

if (NOT MSVC)
# -Wunused-but-set-variable is triggered in code generated by bison that we do not control. Turn this warning off, but only for the generated.
Expand Down