diff options
Diffstat (limited to 'csv')
-rw-r--r-- | csv/CMakeLists.txt | 1 | ||||
-rw-r--r-- | csv/csv.cpp | 7 |
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; |