This commit is contained in:
SpaceIm 2025-01-25 13:56:52 +01:00 committed by GitHub
commit bcea6f8011
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 42 deletions

View File

@ -91,7 +91,12 @@ set_property(TARGET yaml-cpp
PROPERTY PROPERTY
CXX_STANDARD_REQUIRED ON) CXX_STANDARD_REQUIRED ON)
if (NOT YAML_BUILD_SHARED_LIBS) if(YAML_BUILD_SHARED_LIBS)
set_target_properties(yaml-cpp PROPERTIES
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON
)
else()
set_property(TARGET yaml-cpp PROPERTY POSITION_INDEPENDENT_CODE ${YAML_ENABLE_PIC}) set_property(TARGET yaml-cpp PROPERTY POSITION_INDEPENDENT_CODE ${YAML_ENABLE_PIC})
endif() endif()

View File

@ -7,12 +7,11 @@
// Definition yaml_cpp_EXPORTS using to building YAML-CPP as dll/so library // Definition yaml_cpp_EXPORTS using to building YAML-CPP as dll/so library
// (definition created by CMake or defined manually) // (definition created by CMake or defined manually)
#ifndef YAML_CPP_API
# ifdef YAML_CPP_STATIC_DEFINE # ifdef YAML_CPP_STATIC_DEFINE
# define YAML_CPP_API # define YAML_CPP_API
# define YAML_CPP_NO_EXPORT
# else # else
# if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__) # ifdef _WIN32
# ifndef YAML_CPP_API
# ifdef yaml_cpp_EXPORTS # ifdef yaml_cpp_EXPORTS
/* We are building this library */ /* We are building this library */
# define YAML_CPP_API __declspec(dllexport) # define YAML_CPP_API __declspec(dllexport)
@ -20,40 +19,10 @@
/* We are using this library */ /* We are using this library */
# define YAML_CPP_API __declspec(dllimport) # define YAML_CPP_API __declspec(dllimport)
# endif # endif
# endif
# ifndef YAML_CPP_NO_EXPORT
# define YAML_CPP_NO_EXPORT
# endif
# else /* No _MSC_VER */
# ifndef YAML_CPP_API
# ifdef yaml_cpp_EXPORTS
/* We are building this library */
# define YAML_CPP_API __attribute__((visibility("default")))
# else # else
/* We are using this library */
# define YAML_CPP_API __attribute__((visibility("default"))) # define YAML_CPP_API __attribute__((visibility("default")))
# endif # endif /* _WIN32 */
# endif
# ifndef YAML_CPP_NO_EXPORT
# define YAML_CPP_NO_EXPORT __attribute__((visibility("hidden")))
# endif
# endif /* _MSC_VER */
# endif /* YAML_CPP_STATIC_DEFINE */ # endif /* YAML_CPP_STATIC_DEFINE */
#ifndef YAML_CPP_DEPRECATED
# ifdef _MSC_VER
# define YAML_CPP_DEPRECATED __declspec(deprecated)
# else
# define YAML_CPP_DEPRECATED __attribute__ ((__deprecated__))
# endif
#endif
#ifndef YAML_CPP_DEPRECATED_EXPORT
# define YAML_CPP_DEPRECATED_EXPORT YAML_CPP_API YAML_CPP_DEPRECATED
#endif
#ifndef YAML_CPP_DEPRECATED_NO_EXPORT
# define YAML_CPP_DEPRECATED_NO_EXPORT YAML_CPP_NO_EXPORT YAML_CPP_DEPRECATED
#endif #endif
#endif /* DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 */ #endif /* DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 */