mirror of
https://github.com/gabime/spdlog.git
synced 2025-02-05 04:06:46 +08:00
Try fix windows link error with visiblity
This commit is contained in:
parent
b93c0f8e8d
commit
ace82f7da6
@ -242,9 +242,6 @@ if (BUILD_SHARED_LIBS)
|
|||||||
endif ()
|
endif ()
|
||||||
add_library(spdlog SHARED ${VERSION_RC})
|
add_library(spdlog SHARED ${VERSION_RC})
|
||||||
target_compile_definitions(spdlog PUBLIC SPDLOG_SHARED_LIB)
|
target_compile_definitions(spdlog PUBLIC SPDLOG_SHARED_LIB)
|
||||||
set_target_properties(spdlog PROPERTIES
|
|
||||||
CXX_VISIBILITY_PRESET hidden
|
|
||||||
VISIBILITY_INLINES_HIDDEN ON)
|
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
# disable dlls related warnings on msvc
|
# disable dlls related warnings on msvc
|
||||||
@ -254,6 +251,9 @@ if (BUILD_SHARED_LIBS)
|
|||||||
else ()
|
else ()
|
||||||
add_library(spdlog STATIC)
|
add_library(spdlog STATIC)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
set_target_properties(spdlog PROPERTIES CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON)
|
||||||
|
|
||||||
add_library(spdlog::spdlog ALIAS spdlog)
|
add_library(spdlog::spdlog ALIAS spdlog)
|
||||||
target_sources(spdlog PRIVATE ${SPDLOG_SRCS})
|
target_sources(spdlog PRIVATE ${SPDLOG_SRCS})
|
||||||
target_sources(
|
target_sources(
|
||||||
|
@ -29,7 +29,11 @@
|
|||||||
#define SPDLOG_API __attribute__((visibility("default")))
|
#define SPDLOG_API __attribute__((visibility("default")))
|
||||||
#endif
|
#endif
|
||||||
#else // !defined(SPDLOG_SHARED_LIB)
|
#else // !defined(SPDLOG_SHARED_LIB)
|
||||||
#define SPDLOG_API
|
#if defined(_WIN32)
|
||||||
|
#define SPDLOG_API
|
||||||
|
#else
|
||||||
|
#define SPDLOG_API __attribute__((visibility("default")))
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SPDLOG_FMT_RUNTIME(format_string) fmt::runtime(format_string)
|
#define SPDLOG_FMT_RUNTIME(format_string) fmt::runtime(format_string)
|
||||||
|
Loading…
Reference in New Issue
Block a user