OSDN Git Service

QmlJsDebugClient: Compile it as separate library
authorKai Koehne <kai.koehne@nokia.com>
Fri, 5 Aug 2011 08:20:15 +0000 (10:20 +0200)
committerKai Koehne <kai.koehne@nokia.com>
Fri, 5 Aug 2011 10:17:24 +0000 (12:17 +0200)
Should boost build times.

Change-Id: I35c9fd32d2df6dbdadf4d324eb87dbfb491e5ef2
Reviewed-on: http://codereview.qt.nokia.com/2673
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
src/libs/libs.pro
src/libs/qmljsdebugclient/qdeclarativedebugclient.h
src/libs/qmljsdebugclient/qdeclarativeenginedebug.h
src/libs/qmljsdebugclient/qmljsdebugclient-lib.pri
src/libs/qmljsdebugclient/qmljsdebugclient.pri [new file with mode: 0644]
src/libs/qmljsdebugclient/qmljsdebugclient.pro [new file with mode: 0644]
src/libs/qmljsdebugclient/qmljsdebugclient_global.h [new file with mode: 0644]
src/plugins/debugger/qml/qml.pri
src/plugins/qmljsinspector/qmljsinspector.pro
src/plugins/qmlprofiler/qmlprofiler.pro

index f33e687..f963d67 100644 (file)
@@ -10,11 +10,12 @@ SUBDIRS   = \
     utils \
     utils/process_stub.pro \
     languageutils \
+    symbianutils \
     cplusplus \
     qmljs \
+    qmljsdebugclient \
     glsl \
-    qmleditorwidgets \
-    symbianutils
+    qmleditorwidgets
 
 # Windows: Compile Qt Creator CDB extension if Debugging tools can be detected.    
 win32 {
index 2a80782..170ee51 100644 (file)
 #ifndef QDECLARATIVEDEBUGCLIENT_H
 #define QDECLARATIVEDEBUGCLIENT_H
 
+#include "qmljsdebugclient_global.h"
 #include <QtNetwork/qtcpsocket.h>
 
 namespace QmlJsDebugClient {
 
 class QDeclarativeDebugConnectionPrivate;
-class QDeclarativeDebugConnection : public QIODevice
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugConnection : public QIODevice
 {
     Q_OBJECT
 
@@ -71,7 +72,7 @@ private:
 };
 
 class QDeclarativeDebugClientPrivate;
-class QDeclarativeDebugClient : public QObject
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugClient : public QObject
 {
     Q_OBJECT
     Q_DECLARE_PRIVATE(QDeclarativeDebugClient)
index 127769d..51d3120 100644 (file)
@@ -32,6 +32,7 @@
 #ifndef QDECLARATIVEDEBUG_H
 #define QDECLARATIVEDEBUG_H
 
+#include "qmljsdebugclient_global.h"
 #include <QtCore/qobject.h>
 #include <QtCore/qurl.h>
 #include <QtCore/qvariant.h>
@@ -53,7 +54,7 @@ class QDeclarativeDebugFileReference;
 class QDeclarativeDebugEngineReference;
 class QDeclarativeEngineDebugPrivate;
 
-class QDeclarativeEngineDebug : public QObject
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeEngineDebug : public QObject
 {
     Q_OBJECT
 public:
@@ -102,7 +103,7 @@ private:
     QScopedPointer<QDeclarativeEngineDebugPrivate> d_ptr;
 };
 
-class QDeclarativeDebugWatch : public QObject
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugWatch : public QObject
 {
     Q_OBJECT
 public:
@@ -133,7 +134,7 @@ private:
     int m_objectDebugId;
 };
 
-class QDeclarativeDebugPropertyWatch : public QDeclarativeDebugWatch
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugPropertyWatch : public QDeclarativeDebugWatch
 {
     Q_OBJECT
 public:
@@ -146,7 +147,7 @@ private:
     QString m_name;
 };
 
-class QDeclarativeDebugObjectExpressionWatch : public QDeclarativeDebugWatch
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugObjectExpressionWatch : public QDeclarativeDebugWatch
 {
     Q_OBJECT
 public:
@@ -160,7 +161,7 @@ private:
     int m_debugId;
 };
 
-class QDeclarativeDebugQuery : public QObject
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugQuery : public QObject
 {
     Q_OBJECT
 public:
@@ -182,7 +183,7 @@ private:
     State m_state;
 };
 
-class QDeclarativeDebugFileReference
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugFileReference
 {
 public:
     QDeclarativeDebugFileReference();
@@ -203,7 +204,7 @@ private:
     int m_columnNumber;
 };
 
-class QDeclarativeDebugEngineReference
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugEngineReference
 {
 public:
     QDeclarativeDebugEngineReference();
@@ -220,7 +221,7 @@ private:
     QString m_name;
 };
 
-class QDeclarativeDebugObjectReference
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugObjectReference
 {
 public:
     QDeclarativeDebugObjectReference();
@@ -251,7 +252,7 @@ private:
     QList<QDeclarativeDebugObjectReference> m_children;
 };
 
-class QDeclarativeDebugContextReference
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugContextReference
 {
 public:
     QDeclarativeDebugContextReference();
@@ -272,7 +273,7 @@ private:
     QList<QDeclarativeDebugContextReference> m_contexts;
 };
 
-class QDeclarativeDebugPropertyReference
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugPropertyReference
 {
 public:
     QDeclarativeDebugPropertyReference();
@@ -297,7 +298,7 @@ private:
 };
 
 
-class QDeclarativeDebugEnginesQuery : public QDeclarativeDebugQuery
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugEnginesQuery : public QDeclarativeDebugQuery
 {
     Q_OBJECT
 public:
@@ -312,7 +313,7 @@ private:
     QList<QDeclarativeDebugEngineReference> m_engines;
 };
 
-class QDeclarativeDebugRootContextQuery : public QDeclarativeDebugQuery
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugRootContextQuery : public QDeclarativeDebugQuery
 {
     Q_OBJECT
 public:
@@ -327,7 +328,7 @@ private:
     QDeclarativeDebugContextReference m_context;
 };
 
-class QDeclarativeDebugObjectQuery : public QDeclarativeDebugQuery
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugObjectQuery : public QDeclarativeDebugQuery
 {
     Q_OBJECT
 public:
@@ -343,7 +344,7 @@ private:
 
 };
 
-class QDeclarativeDebugExpressionQuery : public QDeclarativeDebugQuery
+class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugExpressionQuery : public QDeclarativeDebugQuery
 {
     Q_OBJECT
 public:
index 70ac6cc..c06b426 100644 (file)
@@ -1,15 +1,22 @@
+contains(CONFIG, dll) {
+    DEFINES += QMLJSDEBUGCLIENT_LIB
+} else {
+    DEFINES += QMLJSDEBUGCLIENT_STATIC_LIB
+}
 
-## Input
-HEADERS += \
-../../libs/qmljsdebugclient/qdeclarativeenginedebug.h \
-../../libs/qmljsdebugclient/qpacketprotocol.h \
-../../libs/qmljsdebugclient/qdeclarativedebugclient.h
+INCLUDEPATH += $$PWD/..
 
+HEADERS += \
+    $$PWD/qdeclarativeenginedebug.h \
+    $$PWD/qpacketprotocol.h \
+    $$PWD/qdeclarativedebugclient.h \
+    $$PWD/qmljsdebugclient_global.h
 
 SOURCES += \
-../../libs/qmljsdebugclient/qdeclarativeenginedebug.cpp \
-../../libs/qmljsdebugclient/qpacketprotocol.cpp \
-../../libs/qmljsdebugclient/qdeclarativedebugclient.cpp
-
-
+    $$PWD/qdeclarativeenginedebug.cpp \
+    $$PWD/qpacketprotocol.cpp \
+    $$PWD/qdeclarativedebugclient.cpp
 
+OTHER_FILES += \
+    $$PWD/qmljsdebugclient.pri \
+    $$PWD/qmljsdebugclient-lib.pri
diff --git a/src/libs/qmljsdebugclient/qmljsdebugclient.pri b/src/libs/qmljsdebugclient/qmljsdebugclient.pri
new file mode 100644 (file)
index 0000000..3fd8a3e
--- /dev/null
@@ -0,0 +1,3 @@
+include(../symbianutils/symbianutils.pri)
+
+LIBS *= -l$$qtLibraryName(QmlJSDebugClient)
diff --git a/src/libs/qmljsdebugclient/qmljsdebugclient.pro b/src/libs/qmljsdebugclient/qmljsdebugclient.pro
new file mode 100644 (file)
index 0000000..43468a4
--- /dev/null
@@ -0,0 +1,13 @@
+TEMPLATE = lib
+CONFIG += dll
+TARGET = QmlJSDebugClient
+
+DEFINES += QMLJSDEBUGCLIENT_LIBRARY
+
+include(../../qtcreatorlibrary.pri)
+include(../symbianutils/symbianutils.pri)
+include(qmljsdebugclient-lib.pri)
+
+OTHER_FILES += \
+    qmljsdebugclient.pri \
+    qmljsdebugclient-lib.pri
diff --git a/src/libs/qmljsdebugclient/qmljsdebugclient_global.h b/src/libs/qmljsdebugclient/qmljsdebugclient_global.h
new file mode 100644 (file)
index 0000000..c40003b
--- /dev/null
@@ -0,0 +1,44 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (info@qt.nokia.com)
+**
+**
+** GNU Lesser General Public License Usage
+**
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this file.
+** Please review the following information to ensure the GNU Lesser General
+** Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** Other Usage
+**
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at info@qt.nokia.com.
+**
+**************************************************************************/
+
+#ifndef QMLJSDEBUGCLIENT_GLOBAL_H
+#define QMLJSDEBUGCLIENT_GLOBAL_H
+
+#if defined(QMLJSDEBUGCLIENT_LIB)
+#  define QMLJSDEBUGCLIENT_EXPORT Q_DECL_EXPORT
+#elif defined(QMLJSDEBUGCLIENT_STATIC_LIB)
+#  define QMLJSDEBUGCLIENT_EXPORT
+#else
+#  define QMLJSDEBUGCLIENT_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // QMLJSDEBUGCLIENT_GLOBAL_H
index 0cec0d1..396f247 100644 (file)
@@ -1,4 +1,4 @@
-include($$PWD/../../../libs/qmljsdebugclient/qmljsdebugclient-lib.pri)
+include($$PWD/../../../libs/qmljsdebugclient/qmljsdebugclient.pri)
 include($$PWD/../../../shared/json/json.pri)
 DEFINES += JSON_INCLUDE_PRI
 
index a8213c6..5d39cfa 100644 (file)
@@ -33,7 +33,6 @@ qmljscontextcrumblepath.cpp \
 qmljsinspectorsettings.cpp \
 qmljspropertyinspector.cpp
 
-include(../../libs/qmljsdebugclient/qmljsdebugclient-lib.pri)
 include(../../../share/qtcreator/qml/qmljsdebugger/protocol/protocol.pri)
 
 RESOURCES += qmljsinspector.qrc
@@ -45,3 +44,4 @@ include(../../plugins/coreplugin/coreplugin.pri)
 include(../../plugins/texteditor/texteditor.pri)
 include(../../plugins/debugger/debugger.pri)
 include(../../libs/utils/utils.pri)
+include(../../libs/qmljsdebugclient/qmljsdebugclient.pri)
index 300d910..0b3ad3f 100644 (file)
@@ -9,7 +9,7 @@ include(../../plugins/analyzerbase/analyzerbase.pri)
 include(../../plugins/qmlprojectmanager/qmlprojectmanager.pri)
 include(../../plugins/qt4projectmanager/qt4projectmanager.pri)
 include(../../plugins/remotelinux/remotelinux.pri)
-include(../../libs/qmljsdebugclient/qmljsdebugclient-lib.pri)
+include(../../libs/qmljsdebugclient/qmljsdebugclient.pri)
 include(../../libs/extensionsystem/extensionsystem.pri)
 
 QT += network script declarative