From d884cd45d9398bf3a038ac79c90c317d282f169b Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Sun, 13 Oct 2024 19:42:36 +0300 Subject: [PATCH] CMakeLists.txt: visibility=hidden for add targets --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fd679bc..53479a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,8 @@ if(HAIKU) endif() # add -fPIC globally so that it's linked well -add_compile_options($<$:-fPIC>) +add_compile_options($<$:-fPIC> + -fvisibility=hidden) set(PHYSFS_BUILD_SHARED FALSE CACHE INTERNAL "") set(PHYSFS_DISABLE_INSTALL TRUE CACHE INTERNAL "") @@ -310,7 +311,6 @@ link_deps(twn_third_parties) give_options(${TWN_TARGET}) include_deps(${TWN_TARGET}) link_deps(${TWN_TARGET}) -target_compile_options(${TWN_TARGET} PRIVATE -fvisibility=hidden) target_link_libraries(${TWN_TARGET} PUBLIC twn_third_parties) target_include_directories(${TWN_TARGET} PRIVATE ${TWN_ROOT_DIR}/src)