From 3dde7d5fa8b4a3059a529d6a33273468d729440c Mon Sep 17 00:00:00 2001 From: Arcady Goldmints-Orlov Date: Wed, 18 Sep 2024 12:39:16 -0400 Subject: [PATCH] cmake: Fix symbol visibility on Linux. Use the correct cmake property to set hidden visibility for shared libraries. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e821620586..dc3fb4b9b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()