summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--csv/CMakeLists.txt2
-rw-r--r--csv/csv.cpp2
-rw-r--r--csv/csv.h10
-rw-r--r--csv/export.hpp18
-rw-r--r--csv/import.hpp13
-rw-r--r--proto-ft/CMakeLists.txt2
6 files changed, 37 insertions, 10 deletions
diff --git a/csv/CMakeLists.txt b/csv/CMakeLists.txt
index ef6a3b44..b4c41673 100644
--- a/csv/CMakeLists.txt
+++ b/csv/CMakeLists.txt
@@ -1 +1 @@
-opentrack_boilerplate(opentrack-csv STATIC)
+opentrack_boilerplate(opentrack-csv)
diff --git a/csv/csv.cpp b/csv/csv.cpp
index a5dc93f5..09944154 100644
--- a/csv/csv.cpp
+++ b/csv/csv.cpp
@@ -91,7 +91,7 @@ bool CSV::parseLine(QStringList& ret)
return true;
}
-bool CSV::getGameData(const int id, unsigned char* table, QString& gamename)
+bool CSV::getGameData(int id, unsigned char* table, QString& gamename)
{
for (int i = 0; i < 8; i++)
table[i] = 0;
diff --git a/csv/csv.h b/csv/csv.h
index 940c02a6..06fe8d09 100644
--- a/csv/csv.h
+++ b/csv/csv.h
@@ -7,20 +7,16 @@
#include <QRegExp>
#include <QtGlobal>
-#ifdef BUILD_csv
-# define CSV_EXPORT Q_DECL_EXPORT
-#else
-# define CSV_EXPORT Q_DECL_IMPORT
-#endif
+#include "export.hpp"
-class CSV_EXPORT CSV
+class OPENTRACK_CSV_EXPORT CSV
{
public:
QString readLine();
bool parseLine(QStringList& ret);
void setCodec(const char* codecName);
- static bool getGameData(const int gameID, unsigned char* table, QString& gamename);
+ static bool getGameData(int gameID, unsigned char* table, QString& gamename);
private:
CSV(QIODevice* device);
diff --git a/csv/export.hpp b/csv/export.hpp
new file mode 100644
index 00000000..506833c4
--- /dev/null
+++ b/csv/export.hpp
@@ -0,0 +1,18 @@
+#pragma once
+
+#ifdef BUILD_csv
+# ifdef _WIN32
+# define OPENTRACK_CSV_LINKAGE __declspec(dllexport)
+# else
+# define OPENTRACK_CSV_LINKAGE
+# endif
+
+# ifndef _MSC_VER
+# define OPENTRACK_CSV_EXPORT __attribute__ ((visibility ("default"))) OPENTRACK_CSV_LINKAGE
+# else
+# define OPENTRACK_CSV_EXPORT OPENTRACK_CSV_LINKAGE
+# endif
+
+#else
+# include "import.hpp"
+#endif
diff --git a/csv/import.hpp b/csv/import.hpp
new file mode 100644
index 00000000..5fcfdd58
--- /dev/null
+++ b/csv/import.hpp
@@ -0,0 +1,13 @@
+#pragma once
+
+#ifdef _WIN32
+# define OPENTRACK_CSV_LINKAGE __declspec(dllimport)
+#else
+# define OPENTRACK_CSV_LINKAGE
+#endif
+
+#ifndef _MSC_VER
+# define OPENTRACK_CSV_EXPORT __attribute__ ((visibility ("default"))) OPENTRACK_CSV_LINKAGE
+#else
+# define OPENTRACK_CSV_EXPORT OPENTRACK_CSV_LINKAGE
+#endif
diff --git a/proto-ft/CMakeLists.txt b/proto-ft/CMakeLists.txt
index 44f95ba3..f8a2fe1e 100644
--- a/proto-ft/CMakeLists.txt
+++ b/proto-ft/CMakeLists.txt
@@ -1,4 +1,4 @@
if(WIN32)
opentrack_boilerplate(opentrack-proto-freetrack)
- target_link_libraries(opentrack-proto-freetrack opentrack-csv opentrack-compat)
+ target_link_libraries(opentrack-proto-freetrack opentrack-compat opentrack-csv)
endif()