From 08b975293c356f7a39ca28aa5bc243fe3281d361 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Sun, 14 Dec 2014 13:09:14 +0100 Subject: compile ixes, make akonadi2common an actual shared lib --- common/CMakeLists.txt | 4 ++-- common/commands.h | 5 +++-- common/console.h | 4 +++- common/storage.h | 3 ++- common/storage_unqlite.cpp | 4 +++- common/unqlite/unqlite.h | 2 +- 6 files changed, 14 insertions(+), 8 deletions(-) (limited to 'common') diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index dc9a670..c0cc7d9 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -16,8 +16,8 @@ set(command_SRCS storage_common.cpp ${storage_SRCS}) -message("We have: ${storage_SRCS}") -add_library(${PROJECT_NAME} ${command_SRCS}) +add_library(${PROJECT_NAME} SHARED ${command_SRCS}) +generate_export_header(${PROJECT_NAME} BASE_NAME Akonadi2Common EXPORT_FILE_NAME akonadi2common_export.h) SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) qt5_use_modules(${PROJECT_NAME} Widgets) target_link_libraries(${PROJECT_NAME} ${storage_LIBS}) diff --git a/common/commands.h b/common/commands.h index 534308d..5f2b006 100644 --- a/common/commands.h +++ b/common/commands.h @@ -1,5 +1,6 @@ #pragma once +#include #include class QIODevice; @@ -14,6 +15,6 @@ enum CommandIds { CustomCommand = 0xffff }; -void write(QIODevice *device, int commandId, flatbuffers::FlatBufferBuilder &fbb); +void AKONADI2COMMON_EXPORT write(QIODevice *device, int commandId, flatbuffers::FlatBufferBuilder &fbb); -} \ No newline at end of file +} diff --git a/common/console.h b/common/console.h index d36ce05..0df5c38 100644 --- a/common/console.h +++ b/common/console.h @@ -1,11 +1,13 @@ #pragma once +#include + #include #include class QTextBrowser; -class Console : public QWidget +class AKONADI2COMMON_EXPORT Console : public QWidget { Q_OBJECT public: diff --git a/common/storage.h b/common/storage.h index 3f14e83..2fac068 100644 --- a/common/storage.h +++ b/common/storage.h @@ -1,10 +1,11 @@ #pragma once +#include #include #include #include -class Storage { +class AKONADI2COMMON_EXPORT Storage { public: enum AccessMode { ReadOnly, ReadWrite }; diff --git a/common/storage_unqlite.cpp b/common/storage_unqlite.cpp index f94643f..2bdfc2c 100644 --- a/common/storage_unqlite.cpp +++ b/common/storage_unqlite.cpp @@ -9,7 +9,9 @@ #include #include -#include "unqlite/unqlite.h" +extern "C" { + #include "unqlite/unqlite.h" +} static const char *s_unqliteDir = "/unqlite/"; diff --git a/common/unqlite/unqlite.h b/common/unqlite/unqlite.h index 2a2b1ad..bf7ee50 100644 --- a/common/unqlite/unqlite.h +++ b/common/unqlite/unqlite.h @@ -946,4 +946,4 @@ UNQLITE_APIEXPORT const char * unqlite_lib_signature(void); UNQLITE_APIEXPORT const char * unqlite_lib_ident(void); UNQLITE_APIEXPORT const char * unqlite_lib_copyright(void); -#endif /* _UNQLITE_H_ */ \ No newline at end of file +#endif /* _UNQLITE_H_ */ -- cgit v1.2.3