fix: add LIBDTKCORESHARED_EXPORT for windows
authorharuyukilxz <lxz@ilxz.me>
Thu, 26 Apr 2018 14:42:13 +0000 (22:42 +0800)
committerharuyukilxz <kirigaya@mkacg.com>
Fri, 4 May 2018 06:12:45 +0000 (14:12 +0800)
Change-Id: Idd83445bf1c042cdc4532f3d3820f18d0a5edf8f

20 files changed:
src/filesystem/dbasefilewatcher.h
src/filesystem/dfilesystemwatcher.h
src/filesystem/dfilewatcher.h
src/filesystem/dfilewatchermanager.h
src/filesystem/dpathbuf.cpp [new file with mode: 0644]
src/filesystem/dpathbuf.h
src/filesystem/dstandardpaths.h
src/filesystem/filesystem.pri
src/log/LogManager.h
src/settings/backend/gsettingsbackend.h
src/settings/backend/qsettingbackend.h
src/settings/dsettings.h
src/settings/dsettingsbackend.h
src/settings/dsettingsgroup.h
src/settings/dsettingsoption.h
src/src.pro
src/util/dabstractunitformatter.h
src/util/ddbussender.h
src/util/ddisksizeformatter.h
src/util/dtimeunitformatter.h

index b8cea9fb0472280df8d8e8ce1cfe0725b81d78cf..bbd2aa90b6ad2a75405bcc2331c7331f05514911 100644 (file)
@@ -26,7 +26,7 @@
 DCORE_BEGIN_NAMESPACE
 
 class DBaseFileWatcherPrivate;
-class DBaseFileWatcher : public QObject, public DObject
+class LIBDTKCORESHARED_EXPORT DBaseFileWatcher : public QObject, public DObject
 {
     Q_OBJECT
 
index 2b505ab98fefe9f885c401d8ca85e88e3046b3ff..a224b2d90ea5406774ceac2631debfa74eaa64ab 100644 (file)
@@ -26,7 +26,7 @@
 DCORE_BEGIN_NAMESPACE
 
 class DFileSystemWatcherPrivate;
-class DFileSystemWatcher : public QObject, public DObject
+class LIBDTKCORESHARED_EXPORT DFileSystemWatcher : public QObject, public DObject
 {
     Q_OBJECT
     D_DECLARE_PRIVATE(DFileSystemWatcher)
index fb44d0127433da598cb8e1aee547d7f24011862e..9ac77d767cdb0098d6750d10d6116f089f0fa0ae 100644 (file)
@@ -23,7 +23,7 @@
 DCORE_BEGIN_NAMESPACE
 
 class DFileWatcherPrivate;
-class DFileWatcher : public DBaseFileWatcher
+class LIBDTKCORESHARED_EXPORT DFileWatcher : public DBaseFileWatcher
 {
     Q_OBJECT
 
index 190479efa0a3e18c7fc3fe34b022fb494a6bd788..e41582b9ec8ba9b4821714b79785fef93cc0ea64 100644 (file)
@@ -28,7 +28,7 @@ DCORE_BEGIN_NAMESPACE
 class DFileWatcher;
 
 class DFileWatcherManagerPrivate;
-class DFileWatcherManager : public QObject, public DObject
+class LIBDTKCORESHARED_EXPORT DFileWatcherManager : public QObject, public DObject
 {
     Q_OBJECT
 
diff --git a/src/filesystem/dpathbuf.cpp b/src/filesystem/dpathbuf.cpp
new file mode 100644 (file)
index 0000000..9fe11b2
--- /dev/null
@@ -0,0 +1,6 @@
+#include "dpathbuf.h"
+
+Dtk::Core::DPathBuf::DPathBuf(const QString &path)
+{
+    m_path = QDir(path).absolutePath();
+}
index 499dc11d9c86513b75d6bf5c2e96110f6a6374af..3aa7609ac50a4403a289a28d5b4f9feea0a8375d 100644 (file)
 
 DCORE_BEGIN_NAMESPACE
 
-class DPathBuf
+class LIBDTKCORESHARED_EXPORT DPathBuf
 {
 public:
-    DPathBuf(const QString &path)
-    {
-        m_path = QDir(path).absolutePath();
-    }
+    DPathBuf(const QString &path);
 
     DPathBuf operator/(const QString &p) const
     {
index c749cae09cdfd0f7ec2de7ee8ce203196460a444..491b31f9c9c2c39fa84e08c66d5ac9228969b2a0 100644 (file)
@@ -25,7 +25,7 @@
 DCORE_BEGIN_NAMESPACE
 
 class DStandardPathsPrivate;
-class DStandardPaths
+class LIBDTKCORESHARED_EXPORT DStandardPaths
 {
 public:
     enum Mode {
index d0e67f64e4f783affb6fff2905a679460f2a47bb..c8d81a07bb84d555dc8512286c9340852cd3cd71 100644 (file)
@@ -14,8 +14,8 @@ SOURCES += \
     $$PWD/dbasefilewatcher.cpp \
     $$PWD/dfilewatcher.cpp \
     $$PWD/dfilewatchermanager.cpp \
-    $$PWD/dstandardpaths.cpp
-
+    $$PWD/dstandardpaths.cpp \
+    $$PWD/dpathbuf.cpp
 
 linux {
     SOURCES += \
index c79b5829523baccce84b5088bfe25374c33d6126..689cb236a3752537b36979bf1bf881c0ed2f6717 100644 (file)
@@ -27,7 +27,7 @@ DCORE_BEGIN_NAMESPACE
 class ConsoleAppender;
 class RollingFileAppender;
 
-class DLogManager
+class LIBDTKCORESHARED_EXPORT DLogManager
 {
 public:
     static void registerConsoleAppender();
index 5fd92f74aa7bd9a8a54238325bda277acbc19257..94abdc0ec58363d2e20c9f93444ca3cf7b2574c3 100644 (file)
@@ -8,7 +8,7 @@
 DCORE_BEGIN_NAMESPACE
 
 class GSettingsBackendPrivate;
-class GSettingsBackend: public DSettingsBackend
+class LIBDTKCORESHARED_EXPORT GSettingsBackend: public DSettingsBackend
 {
     Q_OBJECT
 public:
index 643d05eade8f77c8c9ad3a35f0f3be01bf1fd7b1..1388d90f74f23d5d8614ed74ce2a7e19bb20b85f 100644 (file)
@@ -25,7 +25,7 @@
 DCORE_BEGIN_NAMESPACE
 
 class QSettingBackendPrivate;
-class QSettingBackend : public Dtk::Core::DSettingsBackend
+class LIBDTKCORESHARED_EXPORT QSettingBackend : public Dtk::Core::DSettingsBackend
 {
     Q_OBJECT
 public:
index c8a8dfae4e88d21632197648ae02ef7d7a4d8204..e9554444bc76b08cfb389965c1ff4ab19f7c434c 100644 (file)
@@ -29,7 +29,7 @@ class DSettingsBackend;
 class DSettingsOption;
 class DSettingsGroup;
 class DSettingsPrivate;
-class DSettings : public QObject
+class LIBDTKCORESHARED_EXPORT DSettings : public QObject
 {
     Q_OBJECT
 public:
index 9c08ab532ad31e147a2b768125f16e9822e60d02..d4e78891fddcaf18ac3ee237791f13956baf1f86 100644 (file)
@@ -25,7 +25,7 @@
 DCORE_BEGIN_NAMESPACE
 
 class DSettings;
-class DSettingsBackend : public QObject
+class LIBDTKCORESHARED_EXPORT DSettingsBackend : public QObject
 {
     Q_OBJECT
 public:
index 323a1ce4cf77e3b6eafbc0b675bcd9467d6e1a09..b11a9422451c7e5b91f3b2332f3d2024e14d1d75 100644 (file)
@@ -27,7 +27,7 @@
 DCORE_BEGIN_NAMESPACE
 
 class DSettingsGroupPrivate;
-class DSettingsGroup : public QObject
+class LIBDTKCORESHARED_EXPORT DSettingsGroup : public QObject
 {
     Q_OBJECT
 public:
index c1ccbfe475f58840fe824b8cb6f3a30efb96a437..0087c0d8380e1acc3d4262f65bb1ad00f8e5a69a 100644 (file)
@@ -27,7 +27,7 @@ DCORE_BEGIN_NAMESPACE
 
 class DSettingsGroup;
 class DSettingsOptionPrivate;
-class DSettingsOption : public QObject
+class LIBDTKCORESHARED_EXPORT DSettingsOption : public QObject
 {
     Q_OBJECT
     Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged)
index 2414e87290de372947df5e80fa49121b4860be4c..b1982924f435ceacf80d9df079c916239baeed0a 100644 (file)
@@ -80,6 +80,12 @@ includes.files += $$PWD/*.h $$PWD/dtkcore_config.h $$PWD/DtkCore
 
 INSTALLS += includes target
 
+isEmpty(DTK_STATIC_LIB){
+    DEFINES += LIBDTKCORE_LIBRARY
+} else {
+    DEFINES += DTK_STATIC_LIB
+}
+
 #cmake
 include(dtk_cmake.prf)
 
index 395cb0ae7109f79de7c54b51d915e9bada85596c..30c6e2e859dbcc8119bd8e699767f6697b9aed78 100644 (file)
@@ -25,7 +25,7 @@
 
 DCORE_BEGIN_NAMESPACE
 
-class DAbstractUnitFormatter
+class LIBDTKCORESHARED_EXPORT DAbstractUnitFormatter
 {
 public:
     DAbstractUnitFormatter();
index 67e76f74a60f35c3cf6155f8ede2070d98105fb4..25cb6c662960ce603b2818b737446e15270cd272 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef DDBUSSENDER_H
 #define DDBUSSENDER_H
 
+#include "dtkcore_global.h"
+
 #include <QObject>
 #include <QDBusConnection>
 #include <QDBusPendingCall>
@@ -8,7 +10,7 @@
 
 #include <memory>
 
-class DDBusData
+class LIBDTKCORESHARED_EXPORT DDBusData
 {
 public:
     DDBusData();
@@ -20,7 +22,7 @@ public:
     QDBusConnection connection;
 };
 
-class DDBusCaller
+class LIBDTKCORESHARED_EXPORT DDBusCaller
 {
     friend class DDBusSender;
 
@@ -47,7 +49,7 @@ DDBusCaller DDBusCaller::arg(const T &argument)
     return *this;
 }
 
-class DDBusProperty
+class LIBDTKCORESHARED_EXPORT DDBusProperty
 {
     friend class DDBusSender;
 
@@ -74,7 +76,7 @@ QDBusPendingCall DDBusProperty::set(const T &value)
     return iface.asyncCallWithArgumentList(QStringLiteral("Set"), args);
 }
 
-class DDBusSender
+class LIBDTKCORESHARED_EXPORT DDBusSender
 {
 public:
     explicit DDBusSender();
index de7d7d7d422eb992a2668d98a9bd1100fccef391..6ff5121ed98ab8d1bf5e05d134ad23faf352240d 100644 (file)
@@ -22,7 +22,7 @@
 
 DCORE_BEGIN_NAMESPACE
 
-class DDiskSizeFormatter : public DAbstractUnitFormatter
+class LIBDTKCORESHARED_EXPORT DDiskSizeFormatter : public DAbstractUnitFormatter
 {
 public:
     DDiskSizeFormatter();
index 3c71bb8ad7ddcb28fb24436e663802d59b5a609d..90398489e9ec1eacd040a31fa003aa155056939f 100644 (file)
 #ifndef DTIMEUNITFORMATTER_H
 #define DTIMEUNITFORMATTER_H
 
+#include "dtkcore_global.h"
 #include "dabstractunitformatter.h"
 
 DCORE_BEGIN_NAMESPACE
 
-class DTimeUnitFormatter : public DAbstractUnitFormatter
+class LIBDTKCORESHARED_EXPORT DTimeUnitFormatter : public DAbstractUnitFormatter
 {
 public:
     DTimeUnitFormatter();