cmake: Fix symbol visibility on Linux.
Use the correct cmake property to set hidden visibility for shared libraries.
This commit is contained in:
parent
ec7e23f458
commit
3dde7d5fa8
1 changed files with 2 additions and 1 deletions
|
|
@ -267,7 +267,8 @@ endfunction()
|
|||
function(glslang_only_export_explicit_symbols target)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(${target} PUBLIC "GLSLANG_IS_SHARED_LIBRARY=1")
|
||||
set_target_properties(${target} PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
set_target_properties(${target} PROPERTIES CXX_VISIBILITY_PRESET hidden)
|
||||
set_target_properties(${target} PROPERTIES C_VISIBILITY_PRESET hidden)
|
||||
if(WIN32)
|
||||
target_compile_definitions(${target} PRIVATE "GLSLANG_EXPORTING=1")
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue