Skip to content

Commit 281a09f

Browse files
committed
CMake: Use "hidden" symbol visibility by default
Arrange passing -fvisibility=hidden to the compiler where supported, which effectively disables exporting symbols which are not explicitly marked as visible. No further changes are needed because the public API functions were already marked with WPE_EXPORT which marks them as exported. (cherry picked from commit baabb08)
1 parent 101355f commit 281a09f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ target_compile_options(wpe PRIVATE
9797
target_link_libraries(wpe PRIVATE XkbCommon::libxkbcommon ${CMAKE_DL_LIBS})
9898

9999
set_target_properties(wpe PROPERTIES
100+
C_VISIBILITY_PRESET hidden
101+
CXX_VISIBILITY_PRESET hidden
100102
OUTPUT_NAME wpe-${WPE_API_VERSION}
101103
VERSION ${LIBWPE_VERSION}
102104
SOVERSION ${LIBWPE_VERSION_MAJOR}

0 commit comments

Comments
 (0)