diff --git a/ground/openpilotgcs/src/libs/qwt/qwtconfig.pri b/ground/openpilotgcs/src/libs/qwt/qwtconfig.pri index 82754c682..bcc921911 100644 --- a/ground/openpilotgcs/src/libs/qwt/qwtconfig.pri +++ b/ground/openpilotgcs/src/libs/qwt/qwtconfig.pri @@ -30,6 +30,14 @@ VVERSION = $$[QT_VERSION] CONFIG += QwtPlot +###################################################################### +# Build the static/shared libraries. +# If QwtDll is enabled, a shared library is built, otherwise +# it will be a static library. +###################################################################### + +QWT_CONFIG += QwtDll + ###################################################################### # QwtWidgets enables all classes, that are needed to use the all other # widgets (sliders, dials, ...), beside QwtPlot. diff --git a/ground/openpilotgcs/src/libs/qwt/src/qwt_global.h b/ground/openpilotgcs/src/libs/qwt/src/qwt_global.h index baf371f49..5fba57e27 100644 --- a/ground/openpilotgcs/src/libs/qwt/src/qwt_global.h +++ b/ground/openpilotgcs/src/libs/qwt/src/qwt_global.h @@ -29,17 +29,14 @@ #pragma warning(disable: 4660) #endif // _MSC_VER -#ifdef QWT_DLL #if defined(QWT_MAKEDLL) // create a Qwt DLL library -#define QWT_EXPORT __declspec(dllexport) +#define QWT_EXPORT Q_DECL_EXPORT #define QWT_TEMPLATEDLL #else // use a Qwt DLL library -#define QWT_EXPORT __declspec(dllimport) +#define QWT_EXPORT Q_DECL_IMPORT #endif -#endif // QWT_DLL - #endif // Q_WS_WIN #ifndef QWT_EXPORT diff --git a/ground/openpilotgcs/src/libs/qwt/src/src.pro b/ground/openpilotgcs/src/libs/qwt/src/src.pro index 133f92b0f..15c1d04e5 100644 --- a/ground/openpilotgcs/src/libs/qwt/src/src.pro +++ b/ground/openpilotgcs/src/libs/qwt/src/src.pro @@ -4,9 +4,14 @@ DEFINES += QWT_LIBRARY include(../../../openpilotgcslibrary.pri) include( ../qwtconfig.pri ) -#VVERSION = $$[QT_VERSION] - +contains(QWT_CONFIG, QwtDll) { + CONFIG += dll + win32|symbian: DEFINES += QT_DLL QWT_DLL QWT_MAKEDLL +} +else { + CONFIG += staticlib +} HEADERS += \ qwt.h \ qwt_abstract_scale_draw.h \