diff --git a/lib/qtwebenginecoreglobal.h b/lib/qtwebenginecoreglobal.h
new file mode 100644
index 0000000000000000000000000000000000000000..3ad62b4b953fad9785eff3a4f4cf811f9517c584
--- /dev/null
+++ b/lib/qtwebenginecoreglobal.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.  For licensing terms and
+** conditions see http://qt.digia.com/licensing.  For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, 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, Digia gives you certain additional
+** rights.  These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef QTWEBENGINECOREGLOBAL_H
+#define QTWEBENGINECOREGLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+#ifndef QT_STATIC
+#  if defined(BUILDING_CHROMIUM)
+#      define QWEBENGINE_EXPORT Q_DECL_EXPORT
+#  else
+#      define QWEBENGINE_EXPORT Q_DECL_IMPORT
+#  endif
+#else
+#  define QWEBENGINE_EXPORT
+#endif
+
+#endif // QTWEBENGINECOREGLOBAL_H
diff --git a/lib/quick/plugin.cpp b/lib/quick/plugin/plugin.cpp
similarity index 100%
rename from lib/quick/plugin.cpp
rename to lib/quick/plugin/plugin.cpp
diff --git a/lib/quick/plugin/plugin.pro b/lib/quick/plugin/plugin.pro
new file mode 100644
index 0000000000000000000000000000000000000000..93e04f97a15214c7aeef6eb2b54ee5b233fbc861
--- /dev/null
+++ b/lib/quick/plugin/plugin.pro
@@ -0,0 +1,13 @@
+CXX_MODULE = qml
+TARGET = qtwebengineplugin
+TARGETPATH = QtWebEngine
+IMPORT_VERSION = 1.0
+
+QT += webengine qml quick
+QT_PRIVATE += webengine-private qml-private quick-private gui-private core-private
+
+INCLUDEPATH += $$QTWEBENGINE_ROOT/lib $$QTWEBENGINE_ROOT/lib/quick
+
+SOURCES = plugin.cpp
+
+load(qml_plugin)
diff --git a/lib/quick/qmldir b/lib/quick/plugin/qmldir
similarity index 100%
rename from lib/quick/qmldir
rename to lib/quick/plugin/qmldir
diff --git a/lib/quick/qquickwebengineview_p.h b/lib/quick/qquickwebengineview_p.h
index d1fa4ceaaf4cc7e23b98cd6a53cc70c7779a6fef..270ad779c1f1fa483e6c59f1f1acbdec9d269afd 100644
--- a/lib/quick/qquickwebengineview_p.h
+++ b/lib/quick/qquickwebengineview_p.h
@@ -42,13 +42,14 @@
 #ifndef QQUICKWEBENGINEVIEW_P_H
 #define QQUICKWEBENGINEVIEW_P_H
 
+#include <qtwebengineglobal_p.h>
 #include <QQuickItem>
 
 QT_BEGIN_NAMESPACE
 
 class QQuickWebEngineViewPrivate;
 
-class QQuickWebEngineView : public QQuickItem {
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem {
     Q_OBJECT
     Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged)
     Q_PROPERTY(QUrl icon READ icon NOTIFY iconChanged)
diff --git a/lib/quick/qquickwebengineview_p_p.h b/lib/quick/qquickwebengineview_p_p.h
index 040b3fe146230d4d20e48d7a78505db5e5c74cb0..54102253812b627aaf62647ad571448e2bfafdc2 100644
--- a/lib/quick/qquickwebengineview_p_p.h
+++ b/lib/quick/qquickwebengineview_p_p.h
@@ -42,6 +42,7 @@
 #ifndef QQUICKWEBENGINEVIEW_P_P_H
 #define QQUICKWEBENGINEVIEW_P_P_H
 
+#include "qquickwebengineview_p.h"
 #include "web_contents_adapter_client.h"
 
 #include <QSharedData>
@@ -52,7 +53,7 @@ class WebContentsAdapter;
 QT_BEGIN_NAMESPACE
 class QQuickWebEngineView;
 
-class QQuickWebEngineViewPrivate : public QQuickItemPrivate, public WebContentsAdapterClient
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineViewPrivate : public QQuickItemPrivate, public WebContentsAdapterClient
 {
 public:
     Q_DECLARE_PUBLIC(QQuickWebEngineView)
diff --git a/lib/qtwebengineglobal.h b/lib/quick/qtwebengineglobal.h
similarity index 91%
rename from lib/qtwebengineglobal.h
rename to lib/quick/qtwebengineglobal.h
index a9069f962950731878e4626c693ae9da7b813496..46f77c55f545beaedfe8799a049193874b815a77 100644
--- a/lib/qtwebengineglobal.h
+++ b/lib/quick/qtwebengineglobal.h
@@ -43,14 +43,18 @@
 
 #include <QtCore/qglobal.h>
 
+QT_BEGIN_NAMESPACE
+
 #ifndef QT_STATIC
-#  if !defined(QT_BUILD_WEBENGINEWIDGETS_LIB) && defined(BUILDING_CHROMIUM)
-#      define QWEBENGINE_EXPORT Q_DECL_EXPORT
+#  if defined(QT_BUILD_WEBENGINE_LIB)
+#      define Q_WEBENGINE_EXPORT Q_DECL_EXPORT
 #  else
-#      define QWEBENGINE_EXPORT Q_DECL_IMPORT
+#      define Q_WEBENGINE_EXPORT Q_DECL_IMPORT
 #  endif
 #else
-#  define QWEBENGINE_EXPORT
+#  define Q_WEBENGINE_EXPORT
 #endif
 
+QT_END_NAMESPACE
+
 #endif // QTWEBENGINEGLOBAL_H
diff --git a/lib/quick/qtwebengineglobal_p.h b/lib/quick/qtwebengineglobal_p.h
new file mode 100644
index 0000000000000000000000000000000000000000..1600dad63f1d94dce2310e8bdac258e060cbf70d
--- /dev/null
+++ b/lib/quick/qtwebengineglobal_p.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.  For licensing terms and
+** conditions see http://qt.digia.com/licensing.  For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, 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, Digia gives you certain additional
+** rights.  These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTWEBENGINEGLOBAL_P_H
+#define QTWEBENGINEGLOBAL_P_H
+
+//
+//  W A R N I N G
+//  -------------
+//
+// This file is not part of the Qt API.  It exists purely as an
+// implementation detail.  This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qtwebengineglobal.h"
+
+QT_BEGIN_NAMESPACE
+
+#define Q_WEBENGINE_PRIVATE_EXPORT Q_WEBENGINE_EXPORT
+
+QT_END_NAMESPACE
+
+#endif // QTWEBENGINEGLOBAL_P_H
diff --git a/lib/quick/quick.pro b/lib/quick/quick.pro
index c4c248a418b32d3446e95f0278bf022aff204019..50353066bf80f54c52b7d9032c2af044a27c8a19 100644
--- a/lib/quick/quick.pro
+++ b/lib/quick/quick.pro
@@ -1,7 +1,8 @@
-CXX_MODULE = qml
-TARGET = qtwebengineplugin
-TARGETPATH = QtWebEngine
-IMPORT_VERSION = 1.0
+TARGET = QtWebEngine
+MODULE = webengine
+
+# For our export macros
+DEFINES += QT_BUILD_WEBENGINE_LIB
 
 QT += qml quick
 QT_PRIVATE += qml-private quick-private gui-private core-private
@@ -21,12 +22,13 @@ QMAKE_RPATHDIR += $$LIBPATH
 
 SOURCES = \
         qquickwebengineview.cpp \
-        plugin.cpp \
         render_widget_host_view_qt_delegate_quick.cpp
 
 HEADERS = \
+        qtwebengineglobal.h \
+        qtwebengineglobal_p.h \
         qquickwebengineview_p.h \
         qquickwebengineview_p_p.h \
         render_widget_host_view_qt_delegate_quick.h
 
-load(qml_plugin)
+load(qt_module)
diff --git a/lib/render_widget_host_view_qt_delegate.h b/lib/render_widget_host_view_qt_delegate.h
index d08296a8e61629a02702b3407cc2a0ea532edc4f..74151fdbfcb2b0be7084b681c771b623a20e17aa 100644
--- a/lib/render_widget_host_view_qt_delegate.h
+++ b/lib/render_widget_host_view_qt_delegate.h
@@ -42,7 +42,7 @@
 #ifndef RENDER_WIDGET_HOST_VIEW_QT_DELEGATE_H
 #define RENDER_WIDGET_HOST_VIEW_QT_DELEGATE_H
 
-#include "qtwebengineglobal.h"
+#include "qtwebenginecoreglobal.h"
 
 #include <QRect>
 #include <QtGui/qwindowdefs.h>
diff --git a/lib/web_contents_adapter.h b/lib/web_contents_adapter.h
index cde5a147df56c4b4bc413bfc3f4e54dc95b96f56..f631b6d692c275f43b3d49f38989bda5125b37ba 100644
--- a/lib/web_contents_adapter.h
+++ b/lib/web_contents_adapter.h
@@ -41,7 +41,7 @@
 #ifndef WEB_CONTENTS_ADAPTER_H
 #define WEB_CONTENTS_ADAPTER_H
 
-#include "qtwebengineglobal.h"
+#include "qtwebenginecoreglobal.h"
 #include "web_contents_adapter_client.h"
 
 #include <QScopedPointer>
diff --git a/lib/web_contents_adapter_client.h b/lib/web_contents_adapter_client.h
index c92d6ddc094034ff59f134f05f39ff1c53778996..c7746ffb1db542b6e18bd36d771d0466d5e32a2b 100644
--- a/lib/web_contents_adapter_client.h
+++ b/lib/web_contents_adapter_client.h
@@ -41,7 +41,7 @@
 #ifndef WEB_CONTENTS_ADAPTER_CLIENT_H
 #define WEB_CONTENTS_ADAPTER_CLIENT_H
 
-#include "qtwebengineglobal.h"
+#include "qtwebenginecoreglobal.h"
 
 #include <QRect>
 #include <QString>
diff --git a/qtwebengine.pro b/qtwebengine.pro
index 605e0a2e1d688ad9e46a710288c45a394e53d3c0..b640e54144235a0c5fb4c31a91a628609b78f4fe 100644
--- a/qtwebengine.pro
+++ b/qtwebengine.pro
@@ -12,15 +12,18 @@ lib.depends = qmake_extras
 process.depends = qmake_extras
 
 # API libraries
-quick_lib.subdir = lib/quick
-quick_lib.target = sub-quick-lib
-quick_lib.depends = build
+webengine_lib.subdir = lib/quick
+webengine_lib.target = sub-webengine-lib
+webengine_lib.depends = build
+quick_plugin_lib.subdir = lib/quick/plugin
+quick_plugin_lib.target = sub-quick-plugin-lib
+quick_plugin_lib.depends = webengine_lib
 widgets_lib.subdir = lib/widgets
 widgets_lib.target = sub-widgets-lib
 widgets_lib.depends = build
 
-sub_examples.depends = quick_lib
-sub_tests.depends = quick_lib
+sub_examples.depends = quick_plugin_lib
+sub_tests.depends = quick_plugin_lib
 
 # This is where we use the generated gypi files and run gyp_qtwebengine
 build.depends = resources shared lib process
@@ -31,7 +34,8 @@ SUBDIRS += qmake_extras \
           lib \
           process \
           build \
-          quick_lib
+          webengine_lib \
+          quick_plugin_lib
 
 qtHaveModule(widgets) {
     SUBDIRS += widgets_lib
diff --git a/sync.profile b/sync.profile
index 80c8649ae840d2c2ea14834f6940185b84d74779..a08c3d9c5cc6fdf8fa25cb8f65a09bf68617040c 100644
--- a/sync.profile
+++ b/sync.profile
@@ -1,4 +1,5 @@
 %modules = ( # path to module name map
+    "QtWebEngine" => "$basedir/lib/quick",
     "QtWebEngineWidgets" => "$basedir/lib/widgets",
 );
 %moduleheaders = ( # restrict the module headers to those found in relative path