mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Hide symbols in cross platform manner
This commit is contained in:
parent
62d1abe491
commit
5fde1ca613
@ -171,11 +171,10 @@ macro(sfml_add_library module)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# if using gcc or clang on a non-Windows platform, we must hide public symbols by default
|
# ensure public symbols are hidden by default (exported ones are explicitly marked)
|
||||||
# (exported ones are explicitly marked)
|
set_target_properties(${target} PROPERTIES
|
||||||
if(NOT SFML_OS_WINDOWS AND (SFML_COMPILER_GCC OR SFML_COMPILER_CLANG))
|
CXX_VISIBILITY_PRESET hidden
|
||||||
set_target_properties(${target} PROPERTIES COMPILE_FLAGS -fvisibility=hidden)
|
VISIBILITY_INLINES_HIDDEN YES)
|
||||||
endif()
|
|
||||||
|
|
||||||
# build frameworks or dylibs
|
# build frameworks or dylibs
|
||||||
if(SFML_OS_MACOSX AND BUILD_SHARED_LIBS AND NOT THIS_STATIC)
|
if(SFML_OS_MACOSX AND BUILD_SHARED_LIBS AND NOT THIS_STATIC)
|
||||||
|
Loading…
Reference in New Issue
Block a user