Skip to content

Commit

Permalink
Declarative building infrastructure.
Browse files Browse the repository at this point in the history
Does nothing if no declarative directories installed.
  • Loading branch information
Warwick Allison committed Nov 4, 2009
1 parent b41f661 commit 714f255
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 3 deletions.
2 changes: 2 additions & 0 deletions bin/syncqt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ my %modules = ( # path to module name map
"QtSql" => "$basedir/src/sql",
"QtNetwork" => "$basedir/src/network",
"QtSvg" => "$basedir/src/svg",
"QtDeclarative" => "$basedir/src/declarative",
"QtScript" => "$basedir/src/script",
"QtScriptTools" => "$basedir/src/scripttools",
"Qt3Support" => "$basedir/src/qt3support",
Expand Down Expand Up @@ -682,6 +683,7 @@ foreach (@modules_to_sync) {
$master_contents .= "#include <QtGui/QtGui>\n" if("$_" eq "gui");
$master_contents .= "#include <QtNetwork/QtNetwork>\n" if("$_" eq "network");
$master_contents .= "#include <QtSvg/QtSvg>\n" if("$_" eq "svg");
$master_contents .= "#include <QtDeclarative/QtDeclarative>\n" if("$_" eq "declarative");
$master_contents .= "#include <QtScript/QtScript>\n" if("$_" eq "script");
$master_contents .= "#include <QtScriptTools/QtScriptTools>\n" if("$_" eq "scripttools");
$master_contents .= "#include <Qt3Support/Qt3Support>\n" if("$_" eq "qt3support");
Expand Down
39 changes: 37 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ CFG_PHONON=auto
CFG_PHONON_BACKEND=yes
CFG_MULTIMEDIA=yes
CFG_SVG=yes
CFG_DECLARATIVE=auto
CFG_WEBKIT=auto # (yes|no|auto)
CFG_JAVASCRIPTCORE_JIT=auto

Expand Down Expand Up @@ -913,7 +914,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style yes options
-incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-svg|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config)
-incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
VAL=yes
;;
Expand Down Expand Up @@ -1844,6 +1845,17 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
fi
;;
declarative)
if [ "$VAL" = "yes" ]; then
CFG_DECLARATIVE="yes"
else
if [ "$VAL" = "no" ]; then
CFG_DECLARATIVE="no"
else
UNKNOWN_OPT=yes
fi
fi
;;
webkit)
if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
Expand Down Expand Up @@ -3233,7 +3245,7 @@ Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir
[-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
[-no-openssl] [-openssl] [-openssl-linked]
[-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit]
[-no-script] [-script] [-no-scripttools] [-scripttools]
[-no-script] [-script] [-no-scripttools] [-scripttools] [-no-declarative] [-declarative]
[additional platform specific options (see below)]
Expand Down Expand Up @@ -3391,6 +3403,9 @@ fi
-no-scripttools .... Do not build the QtScriptTools module.
+ -scripttools ....... Build the QtScriptTools module.
+ -no-declarative .....Do not build the declarative module.
-declarative ....... Build the declarative module.
-platform target ... The operating system and compiler you are building
on ($PLATFORM).
Expand Down Expand Up @@ -5788,6 +5803,19 @@ if [ "$CFG_ALSA" = "auto" ]; then
fi
fi

if [ -f "$relpath/src/declarative/declarative.pro" ]; then
if [ "$CFG_DECLARATIVE" = "auto" ]; then
CFG_DECLARATIVE=yes
fi
else
if [ "$CFG_DECLARATIVE" = "auto" ] || [ "$CFG_DECLARATIVE" = "no" ]; then
CFG_DECLARATIVE=no
else
echo "Error: Unable to locate the qt-declarative package. Refer to the documentation on how to build the package."
exit 1
fi
fi

if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
Expand Down Expand Up @@ -6405,6 +6433,12 @@ else
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
fi

if [ "$CFG_DECLARATIVE" = "yes" ]; then
QT_CONFIG="$QT_CONFIG declarative"
else
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
fi

if [ "$CFG_WEBKIT" = "auto" ]; then
CFG_WEBKIT="$canBuildWebKit"
fi
Expand Down Expand Up @@ -7321,6 +7355,7 @@ if [ "$CFG_WEBKIT" = "yes" ]; then
echo "JavaScriptCore JIT .. $CFG_JAVASCRIPTCORE_JIT"
fi
fi
echo "Declarative module .. $CFG_DECLARATIVE"
echo "STL support ......... $CFG_STL"
echo "PCH support ......... $CFG_PRECOMPILE"
echo "MMX/3DNOW/SSE/SSE2.. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
Expand Down
3 changes: 2 additions & 1 deletion mkspecs/features/qt.prf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ INCLUDEPATH = $$QMAKE_INCDIR_QT $$INCLUDEPATH #prepending prevents us from picki
win32:INCLUDEPATH += $$QMAKE_INCDIR_QT/ActiveQt

# As order does matter for static libs, we reorder the QT variable here
TMPLIBS = webkit phonon multimedia dbus testlib script scripttools svg qt3support sql xmlpatterns xml egl opengl openvg gui network core
TMPLIBS = declarative webkit phonon multimedia dbus testlib script scripttools svg qt3support sql xmlpatterns xml egl opengl openvg gui network core
for(QTLIB, $$list($$TMPLIBS)) {
contains(QT, $$QTLIB): QT_ORDERED += $$QTLIB
}
Expand Down Expand Up @@ -169,6 +169,7 @@ for(QTLIB, $$list($$lower($$unique(QT)))) {
symbian:isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x040000 0x1600000

} else:isEqual(QTLIB, webkit):qlib = QtWebKit
else:isEqual(QTLIB, declarative):qlib = QtDeclarative
else:isEqual(QTLIB, multimedia):qlib = QtMultimedia
else:message("Unknown QT: $$QTLIB"):qlib =
!isEmpty(qlib) {
Expand Down
13 changes: 13 additions & 0 deletions src/corelib/global/qglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,11 @@ class QDataStream;
# else
# define Q_SVG_EXPORT Q_DECL_IMPORT
# endif
# if defined(QT_BUILD_DECLARATIVE_LIB)
# define Q_DECLARATIVE_EXPORT Q_DECL_EXPORT
# else
# define Q_DECLARATIVE_EXPORT Q_DECL_IMPORT
# endif
# if defined(QT_BUILD_OPENGL_LIB)
# define Q_OPENGL_EXPORT Q_DECL_EXPORT
# else
Expand Down Expand Up @@ -1259,6 +1264,7 @@ class QDataStream;
# define Q_SQL_EXPORT Q_DECL_IMPORT
# define Q_NETWORK_EXPORT Q_DECL_IMPORT
# define Q_SVG_EXPORT Q_DECL_IMPORT
# define Q_DECLARATIVE_EXPORT Q_DECL_IMPORT
# define Q_CANVAS_EXPORT Q_DECL_IMPORT
# define Q_OPENGL_EXPORT Q_DECL_IMPORT
# define Q_MULTIMEDIA_EXPORT Q_DECL_IMPORT
Expand Down Expand Up @@ -1287,6 +1293,7 @@ class QDataStream;
# define Q_SQL_EXPORT Q_DECL_EXPORT
# define Q_NETWORK_EXPORT Q_DECL_EXPORT
# define Q_SVG_EXPORT Q_DECL_EXPORT
# define Q_DECLARATIVE_EXPORT Q_DECL_EXPORT
# define Q_OPENGL_EXPORT Q_DECL_EXPORT
# define Q_MULTIMEDIA_EXPORT Q_DECL_EXPORT
# define Q_OPENVG_EXPORT Q_DECL_EXPORT
Expand All @@ -1301,6 +1308,7 @@ class QDataStream;
# define Q_SQL_EXPORT
# define Q_NETWORK_EXPORT
# define Q_SVG_EXPORT
# define Q_DECLARATIVE_EXPORT
# define Q_OPENGL_EXPORT
# define Q_MULTIMEDIA_EXPORT
# define Q_XML_EXPORT
Expand Down Expand Up @@ -2462,6 +2470,7 @@ Q_CORE_EXPORT int qt_symbian_exception2Error(const std::exception& ex);
#define QT_MODULE_SCRIPTTOOLS 0x10000
#define QT_MODULE_OPENVG 0x20000
#define QT_MODULE_MULTIMEDIA 0x40000
#define QT_MODULE_DECLARATIVE 0x80000

/* Qt editions */
#define QT_EDITION_CONSOLE (QT_MODULE_CORE \
Expand Down Expand Up @@ -2492,6 +2501,7 @@ Q_CORE_EXPORT int qt_symbian_exception2Error(const std::exception& ex);
| QT_MODULE_QT3SUPPORTLIGHT \
| QT_MODULE_QT3SUPPORT \
| QT_MODULE_SVG \
| QT_MODULE_DECLARATIVE \
| QT_MODULE_GRAPHICSVIEW \
| QT_MODULE_HELP \
| QT_MODULE_TEST \
Expand Down Expand Up @@ -2563,6 +2573,9 @@ QT_LICENSED_MODULE(Qt3Support)
#if (QT_EDITION & QT_MODULE_SVG)
QT_LICENSED_MODULE(Svg)
#endif
#if (QT_EDITION & QT_MODULE_DECLARATIVE)
QT_LICENSED_MODULE(Declarative)
#endif
#if (QT_EDITION & QT_MODULE_ACTIVEQT)
QT_LICENSED_MODULE(ActiveQt)
#endif
Expand Down
5 changes: 5 additions & 0 deletions src/src.pro
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ contains(QT_CONFIG, webkit) {
}
contains(QT_CONFIG, script): SRC_SUBDIRS += src_script
contains(QT_CONFIG, scripttools): SRC_SUBDIRS += src_scripttools
contains(QT_CONFIG, declarative): SRC_SUBDIRS += src_declarative
SRC_SUBDIRS += src_plugins

src_s60main.subdir = $$QT_SOURCE_TREE/src/s60main
Expand Down Expand Up @@ -92,6 +93,8 @@ src_javascriptcore.subdir = $$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore
src_javascriptcore.target = sub-javascriptcore
src_webkit.subdir = $$QT_SOURCE_TREE/src/3rdparty/webkit/WebCore
src_webkit.target = sub-webkit
src_declarative.subdir = $$QT_SOURCE_TREE/src/declarative
src_declarative.target = sub-declarative

#CONFIG += ordered
!wince*:!symbian:!ordered {
Expand All @@ -118,10 +121,12 @@ src_webkit.target = sub-webkit
src_tools_uic3.depends = src_qt3support src_xml
src_tools_idc.depends = src_corelib
src_tools_activeqt.depends = src_tools_idc src_gui
src_declarative.depends = src_xml src_gui src_script src_network src_svg
src_plugins.depends = src_gui src_sql src_svg
contains(QT_CONFIG, webkit) {
src_webkit.depends = src_gui src_sql src_network src_xml
contains(QT_CONFIG, phonon):src_webkit.depends += src_phonon
contains(QT_CONFIG, declarative):src_declarative.depends += src_webkit
#exists($$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro): src_webkit.depends += src_javascriptcore
}
contains(QT_CONFIG, qt3support): src_plugins.depends += src_qt3support
Expand Down
2 changes: 2 additions & 0 deletions tests/auto/auto.pro
Original file line number Diff line number Diff line change
Expand Up @@ -501,3 +501,5 @@ contains(QT_CONFIG, webkit): SUBDIRS += \
qwebhistoryinterface \
qwebelement \
qwebhistory

contains(QT_CONFIG, declarative): SUBDIRS += declarative
12 changes: 12 additions & 0 deletions tools/configure/configureapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ Configure::Configure( int& argc, char** argv )
dictionary[ "MULTIMEDIA" ] = "yes";
dictionary[ "DIRECTSHOW" ] = "no";
dictionary[ "WEBKIT" ] = "auto";
dictionary[ "DECLARATIVE" ] = "no";
dictionary[ "PLUGIN_MANIFESTS" ] = "yes";

QString version;
Expand Down Expand Up @@ -905,6 +906,10 @@ void Configure::parseCmdLine()
dictionary[ "WEBKIT" ] = "no";
} else if( configCmdLine.at(i) == "-webkit" ) {
dictionary[ "WEBKIT" ] = "yes";
} else if( configCmdLine.at(i) == "-no-declarative" ) {
dictionary[ "DECLARATIVE" ] = "no";
} else if( configCmdLine.at(i) == "-declarative" ) {
dictionary[ "DECLARATIVE" ] = "yes";
} else if( configCmdLine.at(i) == "-no-plugin-manifests" ) {
dictionary[ "PLUGIN_MANIFESTS" ] = "no";
} else if( configCmdLine.at(i) == "-plugin-manifests" ) {
Expand Down Expand Up @@ -1745,6 +1750,8 @@ bool Configure::displayHelp()
desc("SCRIPT", "yes", "-script", "Build the QtScript module.");
desc("SCRIPTTOOLS", "no", "-no-scripttools", "Do not build the QtScriptTools module.");
desc("SCRIPTTOOLS", "yes", "-scripttools", "Build the QtScriptTools module.");
desc("DECLARATIVE", "no", "-no-declarative", "Do not build the declarative module");
desc("DECLARATIVE", "yes", "-declarative", "Build the declarative module");

desc( "-arch <arch>", "Specify an architecture.\n"
"Available values for <arch>:");
Expand Down Expand Up @@ -2507,6 +2514,9 @@ void Configure::generateOutputVars()
if (dictionary["WEBKIT"] == "yes")
qtConfig += "webkit";

if (dictionary["DECLARATIVE"] == "yes")
qtConfig += "declarative";

// We currently have no switch for QtSvg, so add it unconditionally.
qtConfig += "svg";

Expand Down Expand Up @@ -2875,6 +2885,7 @@ void Configure::generateConfigfiles()
if(dictionary["DBUS"] == "no") qconfigList += "QT_NO_DBUS";
if(dictionary["IPV6"] == "no") qconfigList += "QT_NO_IPV6";
if(dictionary["WEBKIT"] == "no") qconfigList += "QT_NO_WEBKIT";
if(dictionary["DECLARATIVE"] == "no") qconfigList += "QT_NO_DECLARATIVE";
if(dictionary["PHONON"] == "no") qconfigList += "QT_NO_PHONON";
if(dictionary["MULTIMEDIA"] == "no") qconfigList += "QT_NO_MULTIMEDIA";
if(dictionary["XMLPATTERNS"] == "no") qconfigList += "QT_NO_XMLPATTERNS";
Expand Down Expand Up @@ -3173,6 +3184,7 @@ void Configure::displayConfig()
cout << "Phonon support.............." << dictionary[ "PHONON" ] << endl;
cout << "QtMultimedia support........" << dictionary[ "MULTIMEDIA" ] << endl;
cout << "WebKit support.............." << dictionary[ "WEBKIT" ] << endl;
cout << "Declarative support........." << dictionary[ "DECLARATIVE" ] << endl;
cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl;
cout << "QtScriptTools support......." << dictionary[ "SCRIPTTOOLS" ] << endl;
cout << "Graphics System............." << dictionary[ "GRAPHICS_SYSTEM" ] << endl;
Expand Down
1 change: 1 addition & 0 deletions tools/tools.pro
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ mac {

embedded:SUBDIRS += kmap2qmap

contains(QT_CONFIG, declarative):SUBDIRS += qmlviewer qmldebugger
contains(QT_CONFIG, dbus):SUBDIRS += qdbus
!wince*:contains(QT_CONFIG, xmlpatterns): SUBDIRS += xmlpatterns xmlpatternsvalidator
embedded: SUBDIRS += makeqpf
Expand Down

0 comments on commit 714f255

Please sign in to comment.