mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
Set CMAKE_CXX_VISIBILITY_PRESET and 3. VISIBILITY_INLINES_HIDDEN when build shared lib
This commit is contained in:
@@ -242,6 +242,10 @@ if (BUILD_SHARED_LIBS)
|
||||
endif ()
|
||||
add_library(spdlog SHARED ${VERSION_RC})
|
||||
target_compile_definitions(spdlog PUBLIC SPDLOG_SHARED_LIB)
|
||||
set_target_properties(spdlog PROPERTIES
|
||||
CXX_VISIBILITY_PRESET hidden
|
||||
VISIBILITY_INLINES_HIDDEN ON)
|
||||
|
||||
if (MSVC)
|
||||
# disable dlls related warnings on msvc
|
||||
target_compile_options(spdlog PUBLIC $<$<AND:$<CXX_COMPILER_ID:MSVC>,$<NOT:$<COMPILE_LANGUAGE:CUDA>>>:/wd4251
|
||||
|
Reference in New Issue
Block a user