aboutsummaryrefslogtreecommitdiffstats
path: root/libpyside
diff options
context:
space:
mode:
Diffstat (limited to 'libpyside')
-rw-r--r--libpyside/CMakeLists.txt3
-rw-r--r--libpyside/pysidemacros.h8
2 files changed, 8 insertions, 3 deletions
diff --git a/libpyside/CMakeLists.txt b/libpyside/CMakeLists.txt
index 9590a32e0..284a38487 100644
--- a/libpyside/CMakeLists.txt
+++ b/libpyside/CMakeLists.txt
@@ -23,7 +23,8 @@ target_link_libraries(pyside
set_target_properties(pyside PROPERTIES
VERSION ${BINDING_API_VERSION}
- SOVERSION "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}")
+ SOVERSION "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}"
+ DEFINE_SYMBOL PYSIDE_EXPORTS)
#
# install stuff
diff --git a/libpyside/pysidemacros.h b/libpyside/pysidemacros.h
index c9e1e11de..ccf8e379a 100644
--- a/libpyside/pysidemacros.h
+++ b/libpyside/pysidemacros.h
@@ -36,10 +36,14 @@
#define PYSIDEMACROS_H
#if defined _WIN32 || defined __CYGWIN__
- #if PYSIDE_BUILD
+ #if PYSIDE_EXPORTS
#define PYSIDE_API __declspec(dllexport)
#else
- #define PYSIDE_API __declspec(dllimport)
+ #if defined __MINGW32__
+ #define PYSIDE_API
+ #else
+ #define PYSIDE_API __declspec(dllimport)
+ #endif
#endif
#else
#if __GNUC__ >= 4