package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

45 lines
1011 B

diff --git a/include/dpp/export.h b/include/dpp/export.h
index f60605cb..ec7d2d55 100644
--- a/include/dpp/export.h
+++ b/include/dpp/export.h
@@ -24,23 +24,28 @@
// Investigate: MSVC doesn't like this
//static_assert(__cplusplus >= 201703L, "D++ Requires a C++17 compatible compiler. Please ensure that you have enabled C++17 in your compiler flags.");
-#ifdef DPP_BUILD
+#ifndef DPP_STATIC
- #ifdef _WIN32
- #include <dpp/win32_safe_warnings.h>
- #endif
+ #if DPP_BUILD
+
+ #ifdef _WIN32
+ #include <dpp/win32_safe_warnings.h>
+ #endif
- #ifdef _WIN32
- #define DPP_EXPORT __declspec(dllexport)
+ #ifdef _WIN32
+ #define DPP_EXPORT __declspec(dllexport)
+ #else
+ #define DPP_EXPORT
+ #endif
#else
- #define DPP_EXPORT
+ #ifdef _WIN32
+ #define DPP_EXPORT __declspec(dllimport)
+ #else
+ #define DPP_EXPORT
+ #endif
#endif
#else
- #ifdef _WIN32
- #define DPP_EXPORT __declspec(dllimport)
- #else
- #define DPP_EXPORT
- #endif
+ #define DPP_EXPORT
#endif
#ifndef _WIN32