diff options
Diffstat (limited to 'opentrack-compat')
-rw-r--r-- | opentrack-compat/camera-names.hpp | 6 | ||||
-rw-r--r-- | opentrack-compat/export.hpp | 8 | ||||
-rw-r--r-- | opentrack-compat/import.hpp | 20 | ||||
-rw-r--r-- | opentrack-compat/options.hpp | 6 | ||||
-rw-r--r-- | opentrack-compat/shm.h | 6 | ||||
-rw-r--r-- | opentrack-compat/timer.hpp | 6 |
6 files changed, 22 insertions, 30 deletions
diff --git a/opentrack-compat/camera-names.hpp b/opentrack-compat/camera-names.hpp index c2879000..ae0c6b25 100644 --- a/opentrack-compat/camera-names.hpp +++ b/opentrack-compat/camera-names.hpp @@ -11,11 +11,7 @@ #include <QList> #include <QString> -#ifdef BUILD_compat -# include "compat-export.hpp" -#else -# include "compat-import.hpp" -#endif +#include "export.hpp" OPENTRACK_COMPAT_EXPORT QList<QString> get_camera_names(); OPENTRACK_COMPAT_EXPORT int camera_name_to_index(const QString &name); diff --git a/opentrack-compat/export.hpp b/opentrack-compat/export.hpp index 100950a0..fbb62e1f 100644 --- a/opentrack-compat/export.hpp +++ b/opentrack-compat/export.hpp @@ -1,6 +1,6 @@ #pragma once -#ifndef OPENTRACK_EXPORT +#ifdef BUILD_compat # ifdef _WIN32 # define OPENTRACK_LINKAGE __declspec(dllexport) # else @@ -8,8 +8,10 @@ # endif # ifndef _MSC_VER -# define OPENTRACK_EXPORT __attribute__ ((visibility ("default"))) OPENTRACK_LINKAGE +# define OPENTRACK_COMPAT_EXPORT __attribute__ ((visibility ("default"))) OPENTRACK_LINKAGE # else -# define OPENTRACK_EXPORT OPENTRACK_LINKAGE +# define OPENTRACK_COMPAT_EXPORT OPENTRACK_LINKAGE # endif +#else +# include "import.hpp" #endif diff --git a/opentrack-compat/import.hpp b/opentrack-compat/import.hpp index 3747b141..1b4aa8f1 100644 --- a/opentrack-compat/import.hpp +++ b/opentrack-compat/import.hpp @@ -1,15 +1,13 @@ #pragma once -#ifndef OPENTRACK_EXPORT -# ifdef _WIN32 -# define OPENTRACK_LINKAGE __declspec(dllimport) -# else -# define OPENTRACK_LINKAGE -# endif +#ifdef _WIN32 +# define OPENTRACK_LINKAGE __declspec(dllimport) +#else +# define OPENTRACK_LINKAGE +#endif -# ifndef _MSC_VER -# define OPENTRACK_EXPORT __attribute__ ((visibility ("default"))) OPENTRACK_LINKAGE -# else -# define OPENTRACK_EXPORT OPENTRACK_LINKAGE -# endif +#ifndef _MSC_VER +# define OPENTRACK_COMPAT_EXPORT __attribute__ ((visibility ("default"))) OPENTRACK_LINKAGE +#else +# define OPENTRACK_COMPAT_EXPORT OPENTRACK_LINKAGE #endif diff --git a/opentrack-compat/options.hpp b/opentrack-compat/options.hpp index 17ab093c..b8db411a 100644 --- a/opentrack-compat/options.hpp +++ b/opentrack-compat/options.hpp @@ -42,11 +42,7 @@ #include <QDebug> -#ifdef BUILD_compat -# include "compat-export.hpp" -#else -# include "compat-import.hpp" -#endif +#include "export.hpp" template<typename t> using mem = std::shared_ptr<t>; diff --git a/opentrack-compat/shm.h b/opentrack-compat/shm.h index 3edb0080..c7af4ac7 100644 --- a/opentrack-compat/shm.h +++ b/opentrack-compat/shm.h @@ -24,11 +24,7 @@ # pragma GCC diagnostic ignored "-Wattributes" #endif -#ifdef BUILD_compat -# include "compat-export.hpp" -#else -# include "compat-import.hpp" -#endif +#include "export.hpp" class OPENTRACK_COMPAT_EXPORT PortableLockedShm { public: diff --git a/opentrack-compat/timer.hpp b/opentrack-compat/timer.hpp index 4f7e8d2e..c048844c 100644 --- a/opentrack-compat/timer.hpp +++ b/opentrack-compat/timer.hpp @@ -8,6 +8,9 @@ #pragma once #include <ctime> + +#include "export.hpp" + #if defined (_WIN32) # include <windows.h> # ifndef CLOCK_MONOTONIC @@ -52,7 +55,8 @@ static inline void clock_gettime(int, struct timespec* ts) } # endif #endif -class Timer { +class OPENTRACK_COMPAT_EXPORT Timer +{ private: struct timespec state; long long conv(const struct timespec& cur) const |