static_export.patch 1011 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. diff --git a/include/dpp/export.h b/include/dpp/export.h
  2. index f60605cb..ec7d2d55 100644
  3. --- a/include/dpp/export.h
  4. +++ b/include/dpp/export.h
  5. @@ -24,23 +24,28 @@
  6. // Investigate: MSVC doesn't like this
  7. //static_assert(__cplusplus >= 201703L, "D++ Requires a C++17 compatible compiler. Please ensure that you have enabled C++17 in your compiler flags.");
  8. -#ifdef DPP_BUILD
  9. +#ifndef DPP_STATIC
  10. - #ifdef _WIN32
  11. - #include <dpp/win32_safe_warnings.h>
  12. - #endif
  13. + #if DPP_BUILD
  14. +
  15. + #ifdef _WIN32
  16. + #include <dpp/win32_safe_warnings.h>
  17. + #endif
  18. - #ifdef _WIN32
  19. - #define DPP_EXPORT __declspec(dllexport)
  20. + #ifdef _WIN32
  21. + #define DPP_EXPORT __declspec(dllexport)
  22. + #else
  23. + #define DPP_EXPORT
  24. + #endif
  25. #else
  26. - #define DPP_EXPORT
  27. + #ifdef _WIN32
  28. + #define DPP_EXPORT __declspec(dllimport)
  29. + #else
  30. + #define DPP_EXPORT
  31. + #endif
  32. #endif
  33. #else
  34. - #ifdef _WIN32
  35. - #define DPP_EXPORT __declspec(dllimport)
  36. - #else
  37. - #define DPP_EXPORT
  38. - #endif
  39. + #define DPP_EXPORT
  40. #endif
  41. #ifndef _WIN32