mirror of
https://github.com/DaveGamble/cJSON.git
synced 2026-11-06 15:51:31 +00:00
CMake: Set default visibility to hidden and dllexport on windows
This commit is contained in:
1 parent
b44c917be9
commit
6405fd15e3
3 files changed
+18
No files matched your search
@@ -61,6 +61,16 @@ if (ENABLE_SANITIZERS)
|
||||
)
|
||||
endif()
|
||||
|
||||
option(ENABLE_PUBLIC_SYMBOLS "Export library symbols." On)
|
||||
if (ENABLE_PUBLIC_SYMBOLS)
|
||||
list(APPEND custom_compiler_flags -fvisibility=hidden)
|
||||
add_definitions(-DCJSON_EXPORT_SYMBOLS -DCJSON_API_VISIBILITY)
|
||||
endif()
|
||||
option(ENABLE_HIDDEN_SYMBOLS "Hide library symbols." Off)
|
||||
if (ENABLE_HIDDEN_SYMBOLS)
|
||||
add_definitions(-DCJSON_HIDE_SYMBOLS -UCJSON_API_VISIBILITY)
|
||||
endif()
|
||||
|
||||
# apply custom compiler flags
|
||||
foreach(compiler_flag ${custom_compiler_flags})
|
||||
#remove problematic characters
|
||||
|
||||
Reference in new issue
Block a user