Fix GLSLANG_IS_SHARED_LIBRARY define
It was incorrectly always being set, causing linker warnings for MSVC builds. Also simplify the preprocessor nesting in `glslang\Public\ShaderLang.h`
This commit is contained in:
@@ -210,8 +210,8 @@ endif()
|
||||
# GLSLANG_IS_SHARED_LIBRARY define, and GLSLANG_EXPORTING to 1 when specifically
|
||||
# building <target>.
|
||||
function(glslang_only_export_explicit_symbols target)
|
||||
target_compile_definitions(${target} PUBLIC "GLSLANG_IS_SHARED_LIBRARY=1")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(${target} PUBLIC "GLSLANG_IS_SHARED_LIBRARY=1")
|
||||
if(WIN32)
|
||||
target_compile_definitions(${target} PRIVATE "GLSLANG_EXPORTING=1")
|
||||
else()
|
||||
|
||||
Reference in New Issue
Block a user