Skip to content

Commit da84208

Browse files
committed
Hide symbols for unicorn-common
1 parent 38091b3 commit da84208

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CMakeLists.txt

+10
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.15")
1717
cmake_policy(SET CMP0092 NEW)
1818
endif()
1919

20+
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.3")
21+
# Honor visibility properties for all target types.
22+
cmake_policy(SET CMP0063 NEW)
23+
endif()
24+
2025
option(ZIG_BUILD "Enable zig build" OFF)
2126
if(ZIG_BUILD)
2227
include(cmake/zig.cmake)
@@ -1196,6 +1201,11 @@ add_library(unicorn-common STATIC
11961201
${UNICORN_COMMON_SRCS}
11971202
)
11981203

1204+
set_target_properties(unicorn-common
1205+
PROPERTIES
1206+
C_VISIBILITY_PRESET
1207+
hidden)
1208+
11991209
if(NOT MSVC AND NOT ANDROID_ABI)
12001210
target_link_libraries(unicorn-common PRIVATE pthread)
12011211
endif()

0 commit comments

Comments
 (0)