Skip to content

Commit

Permalink
cmake: Fix symbol visibility on Linux.
Browse files Browse the repository at this point in the history
Use the correct cmake property to set hidden visibility for shared
libraries.
  • Loading branch information
arcady-lunarg committed Sep 19, 2024
1 parent ec7e23f commit 3dde7d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3dde7d5

Please sign in to comment.