dll.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
  2. #define DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
  3. // Definition YAML_CPP_STATIC_DEFINE using to building YAML-CPP as static
  4. // library (definition created by CMake or defined manually)
  5. // Definition yaml_cpp_EXPORTS using to building YAML-CPP as dll/so library
  6. // (definition created by CMake or defined manually)
  7. #ifdef YAML_CPP_STATIC_DEFINE
  8. # define YAML_CPP_API
  9. # define YAML_CPP_NO_EXPORT
  10. #else
  11. # if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
  12. # ifndef YAML_CPP_API
  13. # ifdef yaml_cpp_EXPORTS
  14. /* We are building this library */
  15. # pragma message( "Defining YAML_CPP_API for DLL export" )
  16. # define YAML_CPP_API __declspec(dllexport)
  17. # else
  18. /* We are using this library */
  19. # pragma message( "Defining YAML_CPP_API for DLL import" )
  20. # define YAML_CPP_API __declspec(dllimport)
  21. # endif
  22. # endif
  23. # ifndef YAML_CPP_NO_EXPORT
  24. # define YAML_CPP_NO_EXPORT
  25. # endif
  26. # else /* No _MSC_VER */
  27. # ifndef YAML_CPP_API
  28. # ifdef yaml_cpp_EXPORTS
  29. /* We are building this library */
  30. # define YAML_CPP_API __attribute__((visibility("default")))
  31. # else
  32. /* We are using this library */
  33. # define YAML_CPP_API __attribute__((visibility("default")))
  34. # endif
  35. # endif
  36. # ifndef YAML_CPP_NO_EXPORT
  37. # define YAML_CPP_NO_EXPORT __attribute__((visibility("hidden")))
  38. # endif
  39. # endif /* _MSC_VER */
  40. #endif /* YAML_CPP_STATIC_DEFINE */
  41. #ifndef YAML_CPP_DEPRECATED
  42. # ifdef _MSC_VER
  43. # define YAML_CPP_DEPRECATED __declspec(deprecated)
  44. # else
  45. # define YAML_CPP_DEPRECATED __attribute__ ((__deprecated__))
  46. # endif
  47. #endif
  48. #ifndef YAML_CPP_DEPRECATED_EXPORT
  49. # define YAML_CPP_DEPRECATED_EXPORT YAML_CPP_API YAML_CPP_DEPRECATED
  50. #endif
  51. #ifndef YAML_CPP_DEPRECATED_NO_EXPORT
  52. # define YAML_CPP_DEPRECATED_NO_EXPORT YAML_CPP_NO_EXPORT YAML_CPP_DEPRECATED
  53. #endif
  54. #endif /* DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 */