Skip to content

Commit

Permalink
Hide symbols for unicorn-common
Browse files Browse the repository at this point in the history
  • Loading branch information
wtdcode committed Apr 29, 2024
1 parent 38091b3 commit da84208
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.15")
cmake_policy(SET CMP0092 NEW)
endif()

if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.3")
# Honor visibility properties for all target types.
cmake_policy(SET CMP0063 NEW)
endif()

option(ZIG_BUILD "Enable zig build" OFF)
if(ZIG_BUILD)
include(cmake/zig.cmake)
Expand Down Expand Up @@ -1196,6 +1201,11 @@ add_library(unicorn-common STATIC
${UNICORN_COMMON_SRCS}
)

set_target_properties(unicorn-common
PROPERTIES
C_VISIBILITY_PRESET
hidden)

if(NOT MSVC AND NOT ANDROID_ABI)
target_link_libraries(unicorn-common PRIVATE pthread)
endif()
Expand Down

0 comments on commit da84208

Please sign in to comment.