mirror of
https://github.com/RPCS3/glslang.git
synced 2026-01-31 01:25:22 +01:00
[cmake] Use CMake property for symbol visibility
CMake provides a target property to set default symbol visibility which supports different toolchains transparently.
This commit is contained in:
committed by
kd-11
parent
99da060110
commit
f9a15613b0
@@ -234,10 +234,9 @@ 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)
|
||||
if(WIN32)
|
||||
target_compile_definitions(${target} PRIVATE "GLSLANG_EXPORTING=1")
|
||||
else()
|
||||
target_compile_options(${target} PRIVATE "-fvisibility=hidden")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
Reference in New Issue
Block a user