mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 13:15:43 +08:00
Adds capabilities to build as shared library on Windows.
This commit is contained in:
parent
0238828afa
commit
747874b1e5
@ -1,13 +1,19 @@
|
||||
TARGET = AdvancedDockingSystem
|
||||
#VERSION = 0.1.0
|
||||
#CONFIG += adsBuildShared
|
||||
|
||||
QT += core gui
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TEMPLATE = lib
|
||||
|
||||
CONFIG += staticlib
|
||||
|
||||
VERSION = 0.1.0
|
||||
adsBuildShared {
|
||||
CONFIG += shared
|
||||
DEFINES += ADS_EXPORT
|
||||
}
|
||||
!adsBuildShared {
|
||||
CONFIG += staticlib
|
||||
}
|
||||
|
||||
INCLUDEPATH += $$PWD/src
|
||||
INCLUDEPATH += $$PWD/include
|
||||
|
@ -7,6 +7,15 @@
|
||||
#include <QSharedPointer>
|
||||
class QSplitter;
|
||||
|
||||
// DLL Export API
|
||||
#ifdef _WIN32
|
||||
#ifdef ADS_EXPORT
|
||||
#define ADS_EXPORT_API __declspec(dllexport)
|
||||
#else
|
||||
#define ADS_EXPORT_API
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Use namespace
|
||||
// Disabled with Qt4!
|
||||
#ifdef ADS_NAMESPACE_ENABLED
|
||||
|
@ -23,7 +23,7 @@ class InternalContentData;
|
||||
* ContainerWidget is the main container to provide the docking
|
||||
* functionality. It manages mulitple Sections and all possible areas.
|
||||
*/
|
||||
class ContainerWidget : public QFrame
|
||||
class ADS_EXPORT_API ContainerWidget : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged)
|
||||
|
@ -12,7 +12,7 @@
|
||||
ADS_NAMESPACE_BEGIN
|
||||
class ContainerWidget;
|
||||
|
||||
class SectionContent
|
||||
class ADS_EXPORT_API SectionContent
|
||||
{
|
||||
friend class ContainerWidget;
|
||||
|
||||
|
@ -20,7 +20,7 @@ class SectionContentWidget;
|
||||
// SectionWidget manages multiple instances of SectionContent.
|
||||
// It displays a title TAB, which is clickable and will switch to
|
||||
// the contents associated to the title when clicked.
|
||||
class SectionWidget : public QFrame
|
||||
class ADS_EXPORT_API SectionWidget : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class ContainerWidget;
|
||||
|
@ -32,7 +32,7 @@ FORMS += \
|
||||
src/mainwindow.ui
|
||||
|
||||
|
||||
# Dependency: AdvancedDockingSystem
|
||||
# Dependency: AdvancedDockingSystem (staticlib)
|
||||
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../AdvancedDockingSystem/release/ -lAdvancedDockingSystem
|
||||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../AdvancedDockingSystem/debug/ -lAdvancedDockingSystem
|
||||
else:unix: LIBS += -L$$OUT_PWD/../AdvancedDockingSystem/ -lAdvancedDockingSystem
|
||||
@ -45,3 +45,11 @@ else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../Adva
|
||||
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../AdvancedDockingSystem/release/AdvancedDockingSystem.lib
|
||||
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../AdvancedDockingSystem/debug/AdvancedDockingSystem.lib
|
||||
else:unix: PRE_TARGETDEPS += $$OUT_PWD/../AdvancedDockingSystem/libAdvancedDockingSystem.a
|
||||
|
||||
# Dependency: AdvancedDockingSystem (shared)
|
||||
#win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../AdvancedDockingSystem/release/ -lAdvancedDockingSystem
|
||||
#else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../AdvancedDockingSystem/debug/ -lAdvancedDockingSystem
|
||||
#else:unix: LIBS += -L$$OUT_PWD/../AdvancedDockingSystem/ -lAdvancedDockingSystem
|
||||
|
||||
#INCLUDEPATH += $$PWD/../AdvancedDockingSystem/include
|
||||
#DEPENDPATH += $$PWD/../AdvancedDockingSystem/include
|
||||
|
Loading…
Reference in New Issue
Block a user