summaryrefslogtreecommitdiffhomepage
path: root/csv
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-06 07:37:47 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-06 12:07:48 +0200
commit069ebb6212aa096adb1ded0823ac4194db9b0d03 (patch)
treea31c1026a6a0349e7867713ca85e83e8ff79b1be /csv
parent56e9f634d5dd4122278a8f1c5f8e9fe39ed3652e (diff)
gui, api, csv: support hier(7) on Unix
This affects platforms such as FreeBSD, Cygwin or Linux.
Diffstat (limited to 'csv')
-rw-r--r--csv/CMakeLists.txt1
-rw-r--r--csv/csv.cpp7
2 files changed, 7 insertions, 1 deletions
diff --git a/csv/CMakeLists.txt b/csv/CMakeLists.txt
index b4c41673..1590ec59 100644
--- a/csv/CMakeLists.txt
+++ b/csv/CMakeLists.txt
@@ -1 +1,2 @@
opentrack_boilerplate(opentrack-csv)
+target_link_libraries(opentrack-csv opentrack-api)
diff --git a/csv/csv.cpp b/csv/csv.cpp
index 09944154..668da442 100644
--- a/csv/csv.cpp
+++ b/csv/csv.cpp
@@ -10,6 +10,7 @@
*/
#include "csv.h"
+#include "opentrack/library-path.hpp"
#include <QTextDecoder>
#include <QFile>
#include <QCoreApplication>
@@ -98,7 +99,11 @@ bool CSV::getGameData(int id, unsigned char* table, QString& gamename)
QString id_str(move(QString::number(id)));
- QFile file(QCoreApplication::applicationDirPath() + "/settings/facetracknoir supported games.csv");
+ static const QString libexec_path(QStringLiteral("./") +
+ QString(opentrack_library_path) +
+ QStringLiteral("/settings/facetracknoir supported games.csv"));
+
+ QFile file(QCoreApplication::applicationDirPath() + libexec_path);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
return false;