Skip to content

Commit

Permalink
[build] Allow to configure OSSIA_HIDE_ALL_SYMBOLS to internal visibil…
Browse files Browse the repository at this point in the history
…ity for making an even smaller lib
  • Loading branch information
jcelerier committed Jun 26, 2023
1 parent ea053d6 commit bf1537b
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/ossia_setup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,19 @@ else()
endif()

if(OSSIA_HIDE_ALL_SYMBOLS)
set_target_properties(ossia PROPERTIES
C_VISIBILITY_PRESET hidden
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN 1
)
if("${OSSIA_HIDE_ALL_SYMBOLS}" MATCHES "(hidden|internal)")
set_target_properties(ossia PROPERTIES
C_VISIBILITY_PRESET "${OSSIA_HIDE_ALL_SYMBOLS}"
CXX_VISIBILITY_PRESET "${OSSIA_HIDE_ALL_SYMBOLS}"
VISIBILITY_INLINES_HIDDEN 1
)
else()
set_target_properties(ossia PROPERTIES
C_VISIBILITY_PRESET hidden
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN 1
)
endif()
endif()

include(GenerateStaticExport)
Expand Down

0 comments on commit bf1537b

Please sign in to comment.