Made library functions hidden by default on Mac/Linux

This resolves an issue where the server library was calling client
library functions in error.
This commit is contained in:
Jonathan Poncelet 2018-08-07 08:24:04 +01:00
parent 4c55114a3e
commit 65cb1f54f4
2 changed files with 4 additions and 2 deletions

View File

@ -31,6 +31,7 @@ add_definitions(-DCLIENT_WEAPONS -DCLIENT_DLL)
if(NOT MSVC)
add_compile_options(-fno-exceptions) # GCC/Clang flag
add_compile_options(-Wno-write-strings) # GCC/Clang flag
add_compile_options(-fvisibility=hidden) # GCC/Clang flag
add_definitions(-D_LINUX -DLINUX) # It seems enough for all non-Win32 systems
add_definitions(-Dstricmp=strcasecmp -Dstrnicmp=strncasecmp)
if(NOT MINGW)

View File

@ -30,6 +30,7 @@ add_definitions(-DCLIENT_WEAPONS)
if(NOT MSVC)
add_compile_options(-fno-exceptions) # GCC/Clang flag
add_compile_options(-Wno-invalid-offsetof) # GCC/Clang flag
add_compile_options(-fvisibility=hidden) # GCC/Clang flag
add_definitions(-D_LINUX) # It seems enough for all non-Win32 systems
add_definitions(-Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf )
else()