From 1daf9de40f926963dbdfee49e06f2a0633348beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Tue, 16 Jul 2019 23:14:16 +0200 Subject: [PATCH] Cocoa: Fix internal symbol hiding for dylib The default symbol visibility was not set to hidden on macOS. (cherry picked from commit b430bc4935d8ca8ff459313dbd87ecc2b266aee1) --- src/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1928670e..4ff82d7b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -140,7 +140,9 @@ if (BUILD_SHARED_LIBS) set_target_properties(glfw PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_LIBDIR}") - elseif (UNIX) + endif() + + if (UNIX) # Hide symbols not explicitly tagged for export from the shared library target_compile_options(glfw PRIVATE "-fvisibility=hidden") endif()