From 697bf6653a8c7421f0e821ee8d42471246e6850f Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Mon, 4 Feb 2019 12:31:40 +0100 Subject: [PATCH] cmake: fix symbol visibility Avoid exposing unexported symbols, matches autotools behavior. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc9116d..a271876 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,7 @@ else() if (NOT IOS) add_definitions("-Werror") endif() + add_definitions("-fvisibility=hidden") endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)