/**************************************************************************** ** ** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the tools applications 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$ ** ****************************************************************************/ #include "configureapp.h" #include "environment.h" #ifdef COMMERCIAL_VERSION # include "tools.h" #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include QT_BEGIN_NAMESPACE enum Platforms { WINDOWS, WINDOWS_CE, QNX, BLACKBERRY }; std::ostream &operator<<(std::ostream &s, const QString &val) { s << val.toLocal8Bit().data(); return s; } using namespace std; // Macros to simplify options marking #define MARK_OPTION(x,y) ( dictionary[ #x ] == #y ? "*" : " " ) bool writeToFile(const char* text, const QString &filename) { QByteArray symFile(text); QFile file(filename); QDir dir(QFileInfo(file).absoluteDir()); if (!dir.exists()) dir.mkpath(dir.absolutePath()); if (!file.open(QFile::WriteOnly | QFile::Text)) { cout << "Couldn't write to " << qPrintable(filename) << ": " << qPrintable(file.errorString()) << endl; return false; } file.write(symFile); return true; } Configure::Configure(int& argc, char** argv) { // Default values for indentation optionIndent = 4; descIndent = 25; outputWidth = 0; // Get console buffer output width CONSOLE_SCREEN_BUFFER_INFO info; HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE); if (GetConsoleScreenBufferInfo(hStdout, &info)) outputWidth = info.dwSize.X - 1; outputWidth = qMin(outputWidth, 79); // Anything wider gets unreadable if (outputWidth < 35) // Insanely small, just use 79 outputWidth = 79; int i; /* ** Set up the initial state, the default */ dictionary[ "CONFIGCMD" ] = argv[ 0 ]; for (i = 1; i < argc; i++) configCmdLine += argv[ i ]; if (configCmdLine.size() >= 2 && configCmdLine.at(0) == "-srcdir") { sourcePath = QDir::cleanPath(configCmdLine.at(1)); sourceDir = QDir(sourcePath); configCmdLine.erase(configCmdLine.begin(), configCmdLine.begin() + 2); } else { // Get the path to the executable wchar_t module_name[MAX_PATH]; GetModuleFileName(0, module_name, sizeof(module_name) / sizeof(wchar_t)); QFileInfo sourcePathInfo = QString::fromWCharArray(module_name); sourcePath = sourcePathInfo.absolutePath(); sourceDir = sourcePathInfo.dir(); } buildPath = QDir::currentPath(); #if 0 const QString installPath = QString("C:\\Qt\\%1").arg(QT_VERSION_STR); #else const QString installPath = buildPath; #endif if (sourceDir != buildDir) { //shadow builds! if (!findFile("perl") && !findFile("perl.exe")) { cout << "Error: Creating a shadow build of Qt requires" << endl << "perl to be in the PATH environment"; exit(0); // Exit cleanly for Ctrl+C } cout << "Preparing build tree..." << endl; QDir(buildPath).mkpath("bin"); { //make a syncqt script(s) that can be used in the shadow QFile syncqt(buildPath + "/bin/syncqt"); // no QFile::Text, just in case the perl interpreter can't cope with them (unlikely) if (syncqt.open(QFile::WriteOnly)) { QTextStream stream(&syncqt); stream << "#!/usr/bin/perl -w" << endl << "require \"" << sourcePath + "/bin/syncqt\";" << endl; } QFile syncqt_bat(buildPath + "/bin/syncqt.bat"); if (syncqt_bat.open(QFile::WriteOnly | QFile::Text)) { QTextStream stream(&syncqt_bat); stream << "@echo off" << endl << "call " << QDir::toNativeSeparators(sourcePath + "/bin/syncqt.bat") << " -mkspecsdir \"" << QDir::toNativeSeparators(buildPath) << "/mkspecs\" %*" << endl; syncqt_bat.close(); } } //copy the mkspecs buildDir.mkpath("mkspecs"); if (!Environment::cpdir(sourcePath + "/mkspecs", buildPath + "/mkspecs")){ cout << "Couldn't copy mkspecs!" << sourcePath << " " << buildPath << endl; dictionary["DONE"] = "error"; return; } buildDir.mkpath("doc"); if (!Environment::cpdir(sourcePath + "/doc/global", buildPath + "/doc/global")) { cout << "Couldn't copy global documentation!" << sourcePath << " " << buildPath << endl; dictionary["DONE"] = "error"; return; } } defaultBuildParts << QStringLiteral("libs") << QStringLiteral("tools") << QStringLiteral("examples"); dictionary[ "QT_SOURCE_TREE" ] = sourcePath; dictionary[ "QT_BUILD_TREE" ] = buildPath; dictionary[ "QT_INSTALL_PREFIX" ] = installPath; dictionary[ "QMAKESPEC" ] = getenv("QMAKESPEC"); if (dictionary[ "QMAKESPEC" ].size() == 0) { dictionary[ "QMAKESPEC" ] = Environment::detectQMakeSpec(); dictionary[ "QMAKESPEC_FROM" ] = "detected"; } else { dictionary[ "QMAKESPEC_FROM" ] = "env"; } dictionary[ "QCONFIG" ] = "full"; dictionary[ "EMBEDDED" ] = "no"; dictionary[ "BUILD_QMAKE" ] = "yes"; dictionary[ "VCPROJFILES" ] = "yes"; dictionary[ "QMAKE_INTERNAL" ] = "no"; dictionary[ "FAST" ] = "no"; dictionary[ "PROCESS" ] = "partial"; dictionary[ "WIDGETS" ] = "yes"; dictionary[ "RTTI" ] = "yes"; dictionary[ "STRIP" ] = "yes"; dictionary[ "SSE2" ] = "auto"; dictionary[ "SSE3" ] = "auto"; dictionary[ "SSSE3" ] = "auto"; dictionary[ "SSE4_1" ] = "auto"; dictionary[ "SSE4_2" ] = "auto"; dictionary[ "AVX" ] = "auto"; dictionary[ "AVX2" ] = "auto"; dictionary[ "IWMMXT" ] = "auto"; dictionary[ "SYNCQT" ] = "auto"; dictionary[ "CE_CRT" ] = "no"; dictionary[ "CETEST" ] = "auto"; dictionary[ "CE_SIGNATURE" ] = "no"; dictionary[ "AUDIO_BACKEND" ] = "auto"; dictionary[ "WMSDK" ] = "auto"; dictionary[ "V8SNAPSHOT" ] = "auto"; dictionary[ "QML_DEBUG" ] = "yes"; dictionary[ "PLUGIN_MANIFESTS" ] = "yes"; dictionary[ "DIRECTWRITE" ] = "no"; dictionary[ "NIS" ] = "no"; dictionary[ "NEON" ] = "no"; dictionary[ "LARGE_FILE" ] = "yes"; dictionary[ "FONT_CONFIG" ] = "no"; dictionary[ "POSIX_IPC" ] = "no"; dictionary[ "QT_GLIB" ] = "no"; dictionary[ "QT_ICONV" ] = "auto"; dictionary[ "QT_CUPS" ] = "auto"; dictionary[ "CFG_GCC_SYSROOT" ] = "yes"; dictionary[ "SLOG2" ] = "no"; dictionary[ "SYSTEM_PROXIES" ] = "no"; //Only used when cross compiling. dictionary[ "QT_INSTALL_SETTINGS" ] = "/etc/xdg"; QString version; QFile qglobal_h(sourcePath + "/src/corelib/global/qglobal.h"); if (qglobal_h.open(QFile::ReadOnly)) { QTextStream read(&qglobal_h); QRegExp version_regexp("^# *define *QT_VERSION_STR *\"([^\"]*)\""); QString line; while (!read.atEnd()) { line = read.readLine(); if (version_regexp.exactMatch(line)) { version = version_regexp.cap(1).trimmed(); if (!version.isEmpty()) break; } } qglobal_h.close(); } if (version.isEmpty()) version = QString("%1.%2.%3").arg(QT_VERSION>>16).arg(((QT_VERSION>>8)&0xff)).arg(QT_VERSION&0xff); dictionary[ "VERSION" ] = version; { QRegExp version_re("([0-9]*)\\.([0-9]*)\\.([0-9]*)(|-.*)"); if (version_re.exactMatch(version)) { dictionary[ "VERSION_MAJOR" ] = version_re.cap(1); dictionary[ "VERSION_MINOR" ] = version_re.cap(2); dictionary[ "VERSION_PATCH" ] = version_re.cap(3); } } dictionary[ "REDO" ] = "no"; dictionary[ "DEPENDENCIES" ] = "no"; dictionary[ "BUILD" ] = "debug"; dictionary[ "BUILDALL" ] = "auto"; // Means yes, but not explicitly dictionary[ "FORCEDEBUGINFO" ] = "no"; dictionary[ "BUILDTYPE" ] = "none"; dictionary[ "BUILDDEV" ] = "no"; dictionary[ "C++11" ] = "auto"; dictionary[ "SHARED" ] = "yes"; dictionary[ "ZLIB" ] = "auto"; dictionary[ "PCRE" ] = "auto"; dictionary[ "ICU" ] = "auto"; dictionary[ "ANGLE" ] = "auto"; dictionary[ "GIF" ] = "auto"; dictionary[ "JPEG" ] = "auto"; dictionary[ "PNG" ] = "auto"; dictionary[ "LIBJPEG" ] = "auto"; dictionary[ "LIBPNG" ] = "auto"; dictionary[ "FREETYPE" ] = "yes"; dictionary[ "ACCESSIBILITY" ] = "yes"; dictionary[ "OPENGL" ] = "yes"; dictionary[ "OPENGL_ES_2" ] = "yes"; dictionary[ "OPENVG" ] = "no"; dictionary[ "OPENSSL" ] = "auto"; dictionary[ "DBUS" ] = "auto"; dictionary[ "STYLE_WINDOWS" ] = "yes"; dictionary[ "STYLE_WINDOWSXP" ] = "auto"; dictionary[ "STYLE_WINDOWSVISTA" ] = "auto"; dictionary[ "STYLE_FUSION" ] = "yes"; dictionary[ "STYLE_WINDOWSCE" ] = "no"; dictionary[ "STYLE_WINDOWSMOBILE" ] = "no"; dictionary[ "STYLE_GTK" ] = "no"; dictionary[ "SQL_MYSQL" ] = "no"; dictionary[ "SQL_ODBC" ] = "no"; dictionary[ "SQL_OCI" ] = "no"; dictionary[ "SQL_PSQL" ] = "no"; dictionary[ "SQL_TDS" ] = "no"; dictionary[ "SQL_DB2" ] = "no"; dictionary[ "SQL_SQLITE" ] = "auto"; dictionary[ "SQL_SQLITE_LIB" ] = "qt"; dictionary[ "SQL_SQLITE2" ] = "no"; dictionary[ "SQL_IBASE" ] = "no"; QString tmp = dictionary[ "QMAKESPEC" ]; if (tmp.contains("\\")) { tmp = tmp.mid(tmp.lastIndexOf("\\") + 1); } else { tmp = tmp.mid(tmp.lastIndexOf("/") + 1); } dictionary[ "QMAKESPEC" ] = tmp; dictionary[ "INCREDIBUILD_XGE" ] = "auto"; dictionary[ "LTCG" ] = "no"; dictionary[ "NATIVE_GESTURES" ] = "yes"; dictionary[ "MSVC_MP" ] = "no"; } Configure::~Configure() { for (int i=0; i<3; ++i) { QList items = makeList[i]; for (int j=0; jremove("qconfig-").remove(".h"); allConfigs << "full"; // Try internal configurations first. QStringList possible_configs = QStringList() << "minimal" << "small" << "medium" << "large" << "full"; int index = possible_configs.indexOf(dictionary["QCONFIG"]); if (index >= 0) { for (int c = 0; c <= index; c++) { qmakeConfig += possible_configs[c] + "-config"; } return; } // If the internal configurations failed, try others. QStringList::Iterator config; for (config = allConfigs.begin(); config != allConfigs.end(); ++config) { if ((*config) == dictionary[ "QCONFIG" ]) break; } if (config == allConfigs.end()) { dictionary[ "HELP" ] = "yes"; cout << "No such configuration \"" << qPrintable(dictionary[ "QCONFIG" ]) << "\"" << endl ; } else qmakeConfig += (*config) + "-config"; } #endif // Output helper functions --------------------------------[ Start ]- /*! Determines the length of a string token. */ static int tokenLength(const char *str) { if (*str == 0) return 0; const char *nextToken = strpbrk(str, " _/\n\r"); if (nextToken == str || !nextToken) return 1; return int(nextToken - str); } /*! Prints out a string which starts at position \a startingAt, and indents each wrapped line with \a wrapIndent characters. The wrap point is set to the console width, unless that width cannot be determined, or is too small. */ void Configure::desc(const char *description, int startingAt, int wrapIndent) { int linePos = startingAt; bool firstLine = true; const char *nextToken = description; while (*nextToken) { int nextTokenLen = tokenLength(nextToken); if (*nextToken == '\n' // Wrap on newline, duh || (linePos + nextTokenLen > outputWidth)) // Wrap at outputWidth { printf("\n"); linePos = 0; firstLine = false; if (*nextToken == '\n') ++nextToken; continue; } if (!firstLine && linePos < wrapIndent) { // Indent to wrapIndent printf("%*s", wrapIndent , ""); linePos = wrapIndent; if (*nextToken == ' ') { ++nextToken; continue; } } printf("%.*s", nextTokenLen, nextToken); linePos += nextTokenLen; nextToken += nextTokenLen; } } /*! Prints out an option with its description wrapped at the description starting point. If \a skipIndent is true, the indentation to the option is not outputted (used by marked option version of desc()). Extra spaces between option and its description is filled with\a fillChar, if there's available space. */ void Configure::desc(const char *option, const char *description, bool skipIndent, char fillChar) { if (!skipIndent) printf("%*s", optionIndent, ""); int remaining = descIndent - optionIndent - strlen(option); int wrapIndent = descIndent + qMax(0, 1 - remaining); printf("%s", option); if (remaining > 2) { printf(" "); // Space in front for (int i = remaining; i > 2; --i) printf("%c", fillChar); // Fill, if available space } printf(" "); // Space between option and description desc(description, wrapIndent, wrapIndent); printf("\n"); } /*! Same as above, except it also marks an option with an '*', if the option is default action. */ void Configure::desc(const char *mark_option, const char *mark, const char *option, const char *description, char fillChar) { const QString markedAs = dictionary.value(mark_option); if (markedAs == "auto" && markedAs == mark) // both "auto", always => + printf(" + "); else if (markedAs == "auto") // setting marked as "auto" and option is default => + printf(" %c " , (defaultTo(mark_option) == QLatin1String(mark))? '+' : ' '); else if (QLatin1String(mark) == "auto" && markedAs != "no") // description marked as "auto" and option is available => + printf(" %c " , checkAvailability(mark_option) ? '+' : ' '); else // None are "auto", (markedAs == mark) => * printf(" %c " , markedAs == QLatin1String(mark) ? '*' : ' '); desc(option, description, true, fillChar); } /*! Modifies the default configuration based on given -platform option. Eg. switches to different default styles for Windows CE. */ void Configure::applySpecSpecifics() { if (!dictionary[ "XQMAKESPEC" ].isEmpty()) { //Disable building tools, docs and translations when cross compiling. nobuildParts << "docs" << "translations" << "tools"; } if (dictionary[ "XQMAKESPEC" ].startsWith("wince")) { dictionary[ "STYLE_WINDOWSXP" ] = "no"; dictionary[ "STYLE_WINDOWSVISTA" ] = "no"; dictionary[ "STYLE_FUSION" ] = "no"; dictionary[ "STYLE_WINDOWSCE" ] = "yes"; dictionary[ "STYLE_WINDOWSMOBILE" ] = "yes"; dictionary[ "OPENGL" ] = "no"; dictionary[ "OPENSSL" ] = "no"; dictionary[ "RTTI" ] = "no"; dictionary[ "SSE2" ] = "no"; dictionary[ "SSE3" ] = "no"; dictionary[ "SSSE3" ] = "no"; dictionary[ "SSE4_1" ] = "no"; dictionary[ "SSE4_2" ] = "no"; dictionary[ "AVX" ] = "no"; dictionary[ "AVX2" ] = "no"; dictionary[ "IWMMXT" ] = "no"; dictionary[ "CE_CRT" ] = "yes"; dictionary[ "LARGE_FILE" ] = "no"; // We only apply MMX/IWMMXT for mkspecs we know they work if (dictionary[ "XQMAKESPEC" ].startsWith("wincewm")) { dictionary[ "MMX" ] = "yes"; dictionary[ "IWMMXT" ] = "yes"; } } else if (dictionary[ "XQMAKESPEC" ].startsWith("linux")) { //TODO actually wrong. //TODO dictionary[ "STYLE_WINDOWSXP" ] = "no"; dictionary[ "STYLE_WINDOWSVISTA" ] = "no"; dictionary[ "KBD_DRIVERS" ] = "tty"; dictionary[ "GFX_DRIVERS" ] = "linuxfb"; dictionary[ "MOUSE_DRIVERS" ] = "pc linuxtp"; dictionary[ "OPENGL" ] = "no"; dictionary[ "DBUS"] = "no"; dictionary[ "QT_INOTIFY" ] = "no"; dictionary[ "QT_CUPS" ] = "no"; dictionary[ "QT_GLIB" ] = "no"; dictionary[ "QT_ICONV" ] = "no"; dictionary["DECORATIONS"] = "default windows styled"; } else if ((platform() == QNX) || (platform() == BLACKBERRY)) { dictionary["STACK_PROTECTOR_STRONG"] = "auto"; dictionary["SLOG2"] = "auto"; } } QString Configure::locateFileInPaths(const QString &fileName, const QStringList &paths) { QDir d; for (QStringList::ConstIterator it = paths.begin(); it != paths.end(); ++it) { // Remove any leading or trailing ", this is commonly used in the environment // variables QString path = (*it); if (path.startsWith("\"")) path = path.right(path.length() - 1); if (path.endsWith("\"")) path = path.left(path.length() - 1); if (d.exists(path + QDir::separator() + fileName)) { return (path); } } return QString(); } QString Configure::locateFile(const QString &fileName) { QString file = fileName.toLower(); QStringList paths; #if defined(Q_OS_WIN32) QRegExp splitReg("[;,]"); #else QRegExp splitReg("[:]"); #endif if (file.endsWith(".h")) paths = QString::fromLocal8Bit(getenv("INCLUDE")).split(splitReg, QString::SkipEmptyParts); else if (file.endsWith(".lib")) paths = QString::fromLocal8Bit(getenv("LIB")).split(splitReg, QString::SkipEmptyParts); else paths = QString::fromLocal8Bit(getenv("PATH")).split(splitReg, QString::SkipEmptyParts); return locateFileInPaths(file, paths); } // Output helper functions ---------------------------------[ Stop ]- bool Configure::displayHelp() { if (dictionary[ "HELP" ] == "yes") { desc("Usage: configure [options]\n\n", 0, 7); desc("Installation options:\n\n"); desc("These are optional, but you may specify install directories.\n\n", 0, 1); desc( "-prefix ", "This will install everything relative to (default $QT_INSTALL_PREFIX)\n"); desc( "-hostprefix [dir]", "Tools and libraries needed when developing applications are installed in [dir]. " "If [dir] is not given, the current build directory will be used. (default PREFIX)\n"); desc("You may use these to separate different parts of the install:\n\n"); desc( "-bindir ", "Executables will be installed to \n(default PREFIX/bin)"); desc( "-libdir ", "Libraries will be installed to \n(default PREFIX/lib)"); desc( "-docdir ", "Documentation will be installed to \n(default PREFIX/doc)"); desc( "-headerdir ", "Headers will be installed to \n(default PREFIX/include)"); desc( "-plugindir ", "Plugins will be installed to \n(default PREFIX/plugins)"); desc( "-importdir ", "Imports for QML will be installed to \n(default PREFIX/imports)"); desc( "-datadir ", "Data used by Qt programs will be installed to \n(default PREFIX)"); desc( "-translationdir ", "Translations of Qt programs will be installed to \n(default PREFIX/translations)"); desc( "-examplesdir ", "Examples will be installed to \n(default PREFIX/examples)"); desc( "-testsdir ", "Tests will be installed to \n(default PREFIX/tests)\n"); desc( "-hostbindir ", "Host executables will be installed to \n(default HOSTPREFIX/bin)"); desc( "-hostdatadir ", "Data used by qmake will be installed to \n(default HOSTPREFIX)"); #if !defined(EVAL) desc("\nConfigure options:\n\n"); desc(" The defaults (*) are usually acceptable. A plus (+) denotes a default value" " that needs to be evaluated. If the evaluation succeeds, the feature is" " included. Here is a short explanation of each option:\n\n", 0, 1); desc("BUILD", "release","-release", "Compile and link Qt with debugging turned off."); desc("BUILD", "debug", "-debug", "Compile and link Qt with debugging turned on."); desc("BUILDALL", "yes", "-debug-and-release", "Compile and link two Qt libraries, with and without debugging turned on.\n"); desc("FORCEDEBUGINFO", "yes","-force-debug-info", "Create symbol files for release builds.\n"); desc("BUILDDEV", "yes", "-developer-build", "Compile and link Qt with Qt developer options (including auto-tests exporting)\n"); desc("OPENSOURCE", "opensource", "-opensource", "Compile and link the Open-Source Edition of Qt."); desc("COMMERCIAL", "commercial", "-commercial", "Compile and link the Commercial Edition of Qt.\n"); desc("C++11", "yes", "-c++11", "Compile Qt with C++11 support enabled."); desc("C++11", "no", "-no-c++11", "Do not compile Qt with C++11 support enabled.\n"); desc("SHARED", "yes", "-shared", "Create and use shared Qt libraries."); desc("SHARED", "no", "-static", "Create and use static Qt libraries.\n"); desc("LTCG", "yes", "-ltcg", "Use Link Time Code Generation. (Release builds only)"); desc("LTCG", "no", "-no-ltcg", "Do not use Link Time Code Generation.\n"); desc("FAST", "no", "-no-fast", "Configure Qt normally by generating Makefiles for all project files."); desc("FAST", "yes", "-fast", "Configure Qt quickly by generating Makefiles only for library and " "subdirectory targets. All other Makefiles are created as wrappers " "which will in turn run qmake.\n"); desc( "-make ", "Add part to the list of parts to be built at make time"); for (int i=0; i", "Exclude part from the list of parts to be built.\n"); desc("WIDGETS", "no", "-no-widgets", "Disable QtWidgets module.\n"); desc("ACCESSIBILITY", "no", "-no-accessibility", "Do not compile Windows Active Accessibility support."); desc("ACCESSIBILITY", "yes", "-accessibility", "Compile Windows Active Accessibility support.\n"); desc( "-no-sql-", "Disable SQL entirely, by default none are turned on."); desc( "-qt-sql-", "Enable a SQL in the Qt Library."); desc( "-plugin-sql-", "Enable SQL as a plugin to be linked to at run time.\n" "Available values for :"); desc("SQL_MYSQL", "auto", "", " mysql", ' '); desc("SQL_PSQL", "auto", "", " psql", ' '); desc("SQL_OCI", "auto", "", " oci", ' '); desc("SQL_ODBC", "auto", "", " odbc", ' '); desc("SQL_TDS", "auto", "", " tds", ' '); desc("SQL_DB2", "auto", "", " db2", ' '); desc("SQL_SQLITE", "auto", "", " sqlite", ' '); desc("SQL_SQLITE2", "auto", "", " sqlite2", ' '); desc("SQL_IBASE", "auto", "", " ibase", ' '); desc( "", "(drivers marked with a '+' have been detected as available on this system)\n", false, ' '); desc( "-system-sqlite", "Use sqlite from the operating system.\n"); desc("OPENGL", "no","-no-opengl", "Do not support OpenGL."); desc("OPENGL", "no","-opengl ", "Enable OpenGL support with specified API version.\n" "Available values for :"); desc("", "no", "", " desktop - Enable support for Desktop OpenGL", ' '); desc("OPENGL_ES_CM", "no", "", " es1 - Enable support for OpenGL ES Common Profile", ' '); desc("OPENGL_ES_2", "yes", "", " es2 - Enable support for OpenGL ES 2.0\n", ' '); desc("OPENVG", "no","-no-openvg", "Disables OpenVG functionality."); desc("OPENVG", "yes","-openvg", "Enables OpenVG functionality.\n"); desc( "-force-asserts", "Activate asserts in release mode.\n"); #endif desc( "-platform ", "The operating system and compiler you are building on.\n(default %QMAKESPEC%)\n"); desc( "-xplatform ", "The operating system and compiler you are cross compiling to.\n"); desc( "", "See the README file for a list of supported operating systems and compilers.\n", false, ' '); desc( "-sysroot ", "Sets as the target compiler's and qmake's sysroot and also sets pkg-config paths."); desc( "-no-gcc-sysroot", "When using -sysroot, it disables the passing of --sysroot to the compiler.\n"); desc("NIS", "no", "-no-nis", "Do not compile NIS support."); desc("NIS", "yes", "-nis", "Compile NIS support.\n"); desc("NEON", "yes", "-neon", "Enable the use of NEON instructions."); desc("NEON", "no", "-no-neon", "Do not enable the use of NEON instructions.\n"); desc("QT_ICONV", "disable", "-no-iconv", "Do not enable support for iconv(3)."); desc("QT_ICONV", "yes", "-iconv", "Enable support for iconv(3)."); desc("QT_ICONV", "yes", "-sun-iconv", "Enable support for iconv(3) using sun-iconv."); desc("QT_ICONV", "yes", "-gnu-iconv", "Enable support for iconv(3) using gnu-libiconv.\n"); desc("LARGE_FILE", "yes", "-largefile", "Enables Qt to access files larger than 4 GB.\n"); desc("FONT_CONFIG", "yes", "-fontconfig", "Build with FontConfig support."); desc("FONT_CONFIG", "no", "-no-fontconfig", "Do not build with FontConfig support.\n"); desc("POSIX_IPC", "yes", "-posix-ipc", "Enable POSIX IPC.\n"); desc("QT_GLIB", "yes", "-glib", "Compile Glib support.\n"); desc("QT_INSTALL_SETTINGS", "auto", "-sysconfdir ", "Settings used by Qt programs will be looked for in\n.\n"); desc("SYSTEM_PROXIES", "yes", "-system-proxies", "Use system network proxies by default."); desc("SYSTEM_PROXIES", "no", "-no-system-proxies", "Do not use system network proxies by default.\n"); #if !defined(EVAL) desc( "-qtnamespace ", "Wraps all Qt library code in 'namespace name {...}'."); desc( "-qtlibinfix ", "Renames all Qt* libs to Qt*.\n"); desc( "-D ", "Add an explicit define to the preprocessor."); desc( "-I ", "Add an explicit include path."); desc( "-L ", "Add an explicit library path."); desc( "-l ", "Add an explicit library name, residing in a librarypath.\n"); #endif desc( "-help, -h, -?", "Display this information.\n"); #if !defined(EVAL) // 3rd party stuff options go below here -------------------------------------------------------------------------------- desc("Third Party Libraries:\n\n"); desc("ZLIB", "qt", "-qt-zlib", "Use the zlib bundled with Qt."); desc("ZLIB", "system", "-system-zlib", "Use zlib from the operating system.\nSee http://www.gzip.org/zlib\n"); desc("PCRE", "qt", "-qt-pcre", "Use the PCRE library bundled with Qt."); desc("PCRE", "qt", "-system-pcre", "Use the PCRE library from the operating system.\nSee http://pcre.org/\n"); desc("ICU", "yes", "-icu", "Use the ICU library."); desc("ICU", "no", "-no-icu", "Do not use the ICU library.\nSee http://site.icu-project.org/\n"); desc("GIF", "no", "-no-gif", "Do not compile GIF reading support.\n"); desc("LIBPNG", "no", "-no-libpng", "Do not compile PNG support."); desc("LIBPNG", "qt", "-qt-libpng", "Use the libpng bundled with Qt."); desc("LIBPNG", "system","-system-libpng", "Use libpng from the operating system.\nSee http://www.libpng.org/pub/png\n"); desc("LIBJPEG", "no", "-no-libjpeg", "Do not compile JPEG support."); desc("LIBJPEG", "qt", "-qt-libjpeg", "Use the libjpeg bundled with Qt."); desc("LIBJPEG", "system","-system-libjpeg", "Use libjpeg from the operating system.\nSee http://www.ijg.org\n"); desc("FREETYPE", "no", "-no-freetype", "Do not compile in Freetype2 support."); desc("FREETYPE", "yes", "-qt-freetype", "Use the libfreetype bundled with Qt."); desc("FREETYPE", "yes", "-system-freetype", "Use the libfreetype provided by the system."); if ((platform() == QNX) || (platform() == BLACKBERRY)) { desc("SLOG2", "yes", "-slog2", "Compile with slog2 support."); desc("SLOG2", "no", "-no-slog2", "Do not compile with slog2 support."); } desc("ANGLE", "yes", "-angle", "Use the ANGLE implementation of OpenGL ES 2.0."); desc("ANGLE", "no", "-no-angle", "Do not use ANGLE.\nSee http://code.google.com/p/angleproject/\n"); #endif // Qt\Windows only options go below here -------------------------------------------------------------------------------- desc("\nQt for Windows only:\n\n"); desc("VCPROJFILES", "no", "-no-vcproj", "Do not generate VC++ .vcproj files."); desc("VCPROJFILES", "yes", "-vcproj", "Generate VC++ .vcproj files, only if platform \"win32-msvc.net\".\n"); desc("INCREDIBUILD_XGE", "no", "-no-incredibuild-xge", "Do not add IncrediBuild XGE distribution commands to custom build steps."); desc("INCREDIBUILD_XGE", "yes", "-incredibuild-xge", "Add IncrediBuild XGE distribution commands to custom build steps. This will distribute MOC and UIC steps, and other custom buildsteps which are added to the INCREDIBUILD_XGE variable.\n(The IncrediBuild distribution commands are only added to Visual Studio projects)\n"); desc("PLUGIN_MANIFESTS", "no", "-no-plugin-manifests", "Do not embed manifests in plugins."); desc("PLUGIN_MANIFESTS", "yes", "-plugin-manifests", "Embed manifests in plugins.\n"); #if !defined(EVAL) desc("BUILD_QMAKE", "no", "-no-qmake", "Do not compile qmake."); desc("BUILD_QMAKE", "yes", "-qmake", "Compile qmake.\n"); desc("PROCESS", "partial", "-process", "Generate top-level Makefiles/Project files."); desc("PROCESS", "full", "-fully-process", "Generate Makefiles/Project files for the entire Qt\ntree."); desc("PROCESS", "no", "-dont-process", "Do not generate Makefiles/Project files. This will override -no-fast if specified.\n"); desc("RTTI", "no", "-no-rtti", "Do not compile runtime type information."); desc("RTTI", "yes", "-rtti", "Compile runtime type information."); desc("STRIP", "no", "-no-strip", "Do not strip libraries and executables of debug info when installing."); desc("STRIP", "yes", "-strip", "Strip libraries and executables of debug info when installing.\n"); desc("SSE2", "no", "-no-sse2", "Do not compile with use of SSE2 instructions."); desc("SSE2", "yes", "-sse2", "Compile with use of SSE2 instructions."); desc("SSE3", "no", "-no-sse3", "Do not compile with use of SSE3 instructions."); desc("SSE3", "yes", "-sse3", "Compile with use of SSE3 instructions."); desc("SSSE3", "no", "-no-ssse3", "Do not compile with use of SSSE3 instructions."); desc("SSSE3", "yes", "-ssse3", "Compile with use of SSSE3 instructions."); desc("SSE4_1", "no", "-no-sse4.1", "Do not compile with use of SSE4.1 instructions."); desc("SSE4_1", "yes", "-sse4.1", "Compile with use of SSE4.1 instructions."); desc("SSE4_2", "no", "-no-sse4.2", "Do not compile with use of SSE4.2 instructions."); desc("SSE4_2", "yes", "-sse4.2", "Compile with use of SSE4.2 instructions."); desc("AVX", "no", "-no-avx", "Do not compile with use of AVX instructions."); desc("AVX", "yes", "-avx", "Compile with use of AVX instructions."); desc("AVX2", "no", "-no-avx2", "Do not compile with use of AVX2 instructions."); desc("AVX2", "yes", "-avx2", "Compile with use of AVX2 instructions.\n"); desc("OPENSSL", "no", "-no-openssl", "Do not compile support for OpenSSL."); desc("OPENSSL", "yes", "-openssl", "Enable run-time OpenSSL support."); desc("OPENSSL", "linked","-openssl-linked", "Enable linked OpenSSL support.\n"); desc("DBUS", "no", "-no-dbus", "Do not compile in D-Bus support."); desc("DBUS", "yes", "-dbus", "Compile in D-Bus support and load libdbus-1\ndynamically."); desc("DBUS", "linked", "-dbus-linked", "Compile in D-Bus support and link to libdbus-1.\n"); desc("AUDIO_BACKEND", "no","-no-audio-backend", "Do not compile in the platform audio backend into\nQtMultimedia."); desc("AUDIO_BACKEND", "yes","-audio-backend", "Compile in the platform audio backend into QtMultimedia.\n"); desc("QML_DEBUG", "no", "-no-qml-debug", "Do not build the in-process QML debugging support."); desc("QML_DEBUG", "yes", "-qml-debug", "Build the in-process QML debugging support.\n"); desc("DIRECTWRITE", "no", "-no-directwrite", "Do not build support for DirectWrite font rendering."); desc("DIRECTWRITE", "yes", "-directwrite", "Build support for DirectWrite font rendering (experimental, requires DirectWrite availability on target systems, e.g. Windows Vista with Platform Update, Windows 7, etc.)\n"); desc( "-no-style-