From 54c8d2d659832c77914f7cb5940321bced4ec768 Mon Sep 17 00:00:00 2001 From: Alexandre Bouvier Date: Fri, 13 Dec 2024 06:24:32 +0100 Subject: [PATCH] cmake: fix linking of stubbed libraries --- SPIRV/CMakeLists.txt | 4 ++-- glslang/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt index b5fd5b6c26..2004dd59cf 100644 --- a/SPIRV/CMakeLists.txt +++ b/SPIRV/CMakeLists.txt @@ -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 $) else() - target_link_libraries(SPIRV PRIVATE glslang) + target_link_libraries(SPIRV INTERFACE glslang) endif() if(WIN32) diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt index 47925d8d58..eb1dc68e39 100644 --- a/glslang/CMakeLists.txt +++ b/glslang/CMakeLists.txt @@ -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.