diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-11-01 08:36:28 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-11-01 08:49:12 +0100 |
commit | cc16fd0121fe79ae1fd9539a606c19827f64bc23 (patch) | |
tree | d141902716ea4b8e563d9e708c3e99671d791f40 | |
parent | 73921613ddddc8d1f8e0caed21ab8dd490a74eb1 (diff) |
use newly-added preprocessor variable
-rw-r--r-- | csv/csv.cpp | 1 | ||||
-rw-r--r-- | csv/csv.h | 9 | ||||
-rw-r--r-- | opentrack-compat/shm.h | 9 | ||||
-rw-r--r-- | pose-widget/glwidget.h | 9 | ||||
-rw-r--r-- | qxt-mini/CMakeLists.txt | 5 | ||||
-rw-r--r-- | qxt-mini/qxtglobal.h | 6 | ||||
-rw-r--r-- | spline-widget/functionconfig.h | 9 | ||||
-rw-r--r-- | spline-widget/qfunctionconfigurator.h | 4 |
8 files changed, 41 insertions, 11 deletions
diff --git a/csv/csv.cpp b/csv/csv.cpp index 2193ed80..26a36b70 100644 --- a/csv/csv.cpp +++ b/csv/csv.cpp @@ -8,7 +8,6 @@ * purpose with or without fee is hereby granted, provided that the above * * copyright notice and this permission notice appear in all copies. * */ -#define INSIDE_CSV #include "csv.h" #include <QTextDecoder> #include <QFile> @@ -1,4 +1,5 @@ #pragma once +#include <QtGlobal> #include <QObject> #include <QStringList> #include <QIODevice> @@ -6,7 +7,13 @@ #include <QRegExp> #include <QtGlobal> -class CSV +#ifdef BUILD_opentrack_csv +# define CSV_EXPORT Q_DECL_EXPORT +#else +# define CSV_EXPORT Q_DECL_IMPORT +#endif + +class CSV_EXPORT CSV { public: QString readLine(); diff --git a/opentrack-compat/shm.h b/opentrack-compat/shm.h index 17a0d843..7c8a66a9 100644 --- a/opentrack-compat/shm.h +++ b/opentrack-compat/shm.h @@ -18,8 +18,15 @@ #include <unistd.h> #include <sys/types.h> #endif +#include <QtGlobal> -class PortableLockedShm { +#ifdef BUILD_opentrack_compat +# define COMPAT_EXPORT Q_DECL_EXPORT +#else +# define COMPAT_EXPORT Q_DECL_IMPORT +#endif + +class COMPAT_EXPORT PortableLockedShm { public: PortableLockedShm(const char *shmName, const char *mutexName, int mapSize); ~PortableLockedShm(); diff --git a/pose-widget/glwidget.h b/pose-widget/glwidget.h index 81517399..fca3502d 100644 --- a/pose-widget/glwidget.h +++ b/pose-widget/glwidget.h @@ -7,12 +7,19 @@ #pragma once +#include <QtGlobal> #include <QWidget> #include <QPixmap> #include "opentrack/plugin-api.hpp" #include "opentrack/simple-mat.hpp" -class GLWidget : public QWidget +#ifdef BUILD_opentrack_pose_widget +# define POSE_WIDGET_EXPORT Q_DECL_EXPORT +#else +# define POSE_WIDGET_EXPORT Q_DECL_IMPORT +#endif + +class POSE_WIDGET_EXPORT GLWidget : public QWidget { public: using num = float; diff --git a/qxt-mini/CMakeLists.txt b/qxt-mini/CMakeLists.txt index 2fe5993b..5de29cd1 100644 --- a/qxt-mini/CMakeLists.txt +++ b/qxt-mini/CMakeLists.txt @@ -1,8 +1,5 @@ if(UNIX OR APPLE) - opentrack_boilerplate(opentrack-qxt-mini - NO-LINKER-SCRIPT NO-COMPAT - COMPILE "-DQXT_BUILD -DBUILD_QXT_GUI" - ) + opentrack_boilerplate(opentrack-qxt-mini NO-LINKER-SCRIPT NO-COMPAT) if(NOT APPLE) target_link_libraries(opentrack-qxt-mini X11) else() diff --git a/qxt-mini/qxtglobal.h b/qxt-mini/qxtglobal.h index 574482ae..64fd35dc 100644 --- a/qxt-mini/qxtglobal.h +++ b/qxt-mini/qxtglobal.h @@ -51,6 +51,12 @@ #define QXT_DLLEXPORT DO_NOT_USE_THIS_ANYMORE +#ifdef BUILD_opentrack_qxt_mini +# define QXT_BUILD +# define BUILD_QXT_GUI +# define BUILD_QXT +#endif + #ifdef QXT_BUILD # if defined(BUILD_QXT_CORE) # define QXT_CORE_EXPORT Q_DECL_EXPORT diff --git a/spline-widget/functionconfig.h b/spline-widget/functionconfig.h index 6d76d0de..3d2fc23c 100644 --- a/spline-widget/functionconfig.h +++ b/spline-widget/functionconfig.h @@ -8,6 +8,7 @@ #pragma once +#include <QtGlobal> #include <QList> #include <QPointF> #include <QString> @@ -17,7 +18,13 @@ #include <limits> #include "opentrack-compat/qcopyable-mutex.hpp" -class Map { +#ifdef BUILD_opentrack_spline_widget +# define SPLINE_WIDGET_EXPORT Q_DECL_EXPORT +#else +# define SPLINE_WIDGET_EXPORT Q_DECL_IMPORT +#endif + +class SPLINE_WIDGET_EXPORT Map { private: static constexpr int value_count = 10000; diff --git a/spline-widget/qfunctionconfigurator.h b/spline-widget/qfunctionconfigurator.h index baea9e34..4a9cb5f1 100644 --- a/spline-widget/qfunctionconfigurator.h +++ b/spline-widget/qfunctionconfigurator.h @@ -12,10 +12,10 @@ #include <QWidget> #include <QtGui> #include <QPointF> -#include "spline-widget/functionconfig.h" +#include "functionconfig.h" #include "opentrack/plugin-api.hpp" -class QFunctionConfigurator : public QWidget +class SPLINE_WIDGET_EXPORT QFunctionConfigurator : public QWidget { Q_OBJECT Q_PROPERTY(QColor colorBezier READ colorBezier WRITE setColorBezier) |