summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--opentrack-compat/CMakeLists.txt1
-rw-r--r--opentrack-compat/camera-names.cpp (renamed from opentrack/camera-names.cpp)4
-rw-r--r--opentrack-compat/camera-names.hpp (renamed from opentrack/camera-names.hpp)10
-rw-r--r--opentrack/CMakeLists.txt1
-rw-r--r--opentrack/opencv-camera-dialog.hpp2
-rw-r--r--tracker-aruco/ftnoir_tracker_aruco.cpp2
-rw-r--r--tracker-pt/ftnoir_tracker_pt.cpp2
-rw-r--r--tracker-pt/ftnoir_tracker_pt_dialog.cpp2
8 files changed, 15 insertions, 9 deletions
diff --git a/opentrack-compat/CMakeLists.txt b/opentrack-compat/CMakeLists.txt
index 37d53e6c..8dba67e2 100644
--- a/opentrack-compat/CMakeLists.txt
+++ b/opentrack-compat/CMakeLists.txt
@@ -2,3 +2,4 @@ opentrack_boilerplate(opentrack-compat NO-COMPAT NO-LINKER-SCRIPT LINKAGE)
if(NOT WIN32 AND NOT APPLE)
target_link_libraries(opentrack-compat rt)
endif()
+link_with_dinput8(opentrack-compat)
diff --git a/opentrack/camera-names.cpp b/opentrack-compat/camera-names.cpp
index 74e998ca..72bcf41a 100644
--- a/opentrack/camera-names.cpp
+++ b/opentrack-compat/camera-names.cpp
@@ -19,7 +19,7 @@
#include <QDebug>
-int camera_name_to_index(const QString &name)
+OPENTRACK_COMPAT_EXPORT int camera_name_to_index(const QString &name)
{
auto list = get_camera_names();
int ret = list.indexOf(name);
@@ -28,7 +28,7 @@ int camera_name_to_index(const QString &name)
return ret;
}
-QList<QString> get_camera_names() {
+OPENTRACK_COMPAT_EXPORT QList<QString> get_camera_names() {
QList<QString> ret;
#if defined(_WIN32)
// Create the System Device Enumerator.
diff --git a/opentrack/camera-names.hpp b/opentrack-compat/camera-names.hpp
index ef914458..c2879000 100644
--- a/opentrack/camera-names.hpp
+++ b/opentrack-compat/camera-names.hpp
@@ -11,6 +11,12 @@
#include <QList>
#include <QString>
-QList<QString> get_camera_names();
-int camera_name_to_index(const QString &name);
+#ifdef BUILD_compat
+# include "compat-export.hpp"
+#else
+# include "compat-import.hpp"
+#endif
+
+OPENTRACK_COMPAT_EXPORT QList<QString> get_camera_names();
+OPENTRACK_COMPAT_EXPORT int camera_name_to_index(const QString &name);
diff --git a/opentrack/CMakeLists.txt b/opentrack/CMakeLists.txt
index de5975e2..08003a5c 100644
--- a/opentrack/CMakeLists.txt
+++ b/opentrack/CMakeLists.txt
@@ -4,5 +4,4 @@ if(NOT WIN32)
else()
target_link_libraries(opentrack-api winmm)
endif()
-link_with_dinput8(opentrack-api)
target_link_libraries(opentrack-api opentrack-spline-widget)
diff --git a/opentrack/opencv-camera-dialog.hpp b/opentrack/opencv-camera-dialog.hpp
index 0d4a51af..96c7a643 100644
--- a/opentrack/opencv-camera-dialog.hpp
+++ b/opentrack/opencv-camera-dialog.hpp
@@ -12,7 +12,7 @@
#include <QMutex>
#include <QMutexLocker>
#include <opencv2/videoio.hpp>
-#include "opentrack/camera-names.hpp"
+#include "opentrack-compat/camera-names.hpp"
#ifdef __linux
#include <QProcess>
diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp
index 1da5b8df..316c7e13 100644
--- a/tracker-aruco/ftnoir_tracker_aruco.cpp
+++ b/tracker-aruco/ftnoir_tracker_aruco.cpp
@@ -16,7 +16,7 @@
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/videoio.hpp>
-#include "opentrack/camera-names.hpp"
+#include "opentrack-compat/camera-names.hpp"
#include "opentrack-compat/sleep.hpp"
typedef struct {
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp
index 2dbf9068..3dd91a45 100644
--- a/tracker-pt/ftnoir_tracker_pt.cpp
+++ b/tracker-pt/ftnoir_tracker_pt.cpp
@@ -12,7 +12,7 @@
#include <QDebug>
#include <QFile>
#include <QCoreApplication>
-#include "opentrack/camera-names.hpp"
+#include "opentrack-compat/camera-names.hpp"
#include "opentrack-compat/sleep.hpp"
//#define PT_PERF_LOG //log performance
diff --git a/tracker-pt/ftnoir_tracker_pt_dialog.cpp b/tracker-pt/ftnoir_tracker_pt_dialog.cpp
index b1ae2238..551910f7 100644
--- a/tracker-pt/ftnoir_tracker_pt_dialog.cpp
+++ b/tracker-pt/ftnoir_tracker_pt_dialog.cpp
@@ -12,7 +12,7 @@
#include <QDebug>
#include <opencv2/core/core.hpp>
#include <memory>
-#include "opentrack/camera-names.hpp"
+#include "opentrack-compat/camera-names.hpp"
#include <vector>
//-----------------------------------------------------------------------------