forked from qt-creator/qt-creator
Remove pre-Qt 5.3.1 code paths from main Qt Creator pro and pri files
Change-Id: I71bee691a2b9bad7dbdb4ca9c0a938d4313305f7 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
22
README
22
README
@@ -11,13 +11,11 @@ Windows XP SP3 or later
|
||||
Mac OS X 10.7 or later
|
||||
|
||||
Building the sources requires Qt 5.3.1 or later.
|
||||
It is also possible to build with Qt 4.8.x, but in that case the Welcome mode,
|
||||
QML Profiler, and the WinRT and Qbs support are disabled.
|
||||
|
||||
Compiling Qt Creator
|
||||
====================
|
||||
Prerequisites:
|
||||
* Qt 5.3.1 or later (with restrictions also Qt 4.8.x)
|
||||
* Qt 5.3.1 or later
|
||||
* On Windows:
|
||||
- ActiveState Active Perl
|
||||
- MinGW with g++ 4.5 or Visual Studio 2010 or later
|
||||
@@ -33,28 +31,10 @@ You can build Qt Creator with
|
||||
qmake -r
|
||||
make (or mingw32-make or nmake or jom, depending on your platform)
|
||||
|
||||
Note: If you use Qt 4.8 to build on OS X, you need to additionally pass
|
||||
"-spec unsupported/macx-clang-libc++" to qmake.
|
||||
|
||||
Installation ("make install") is not needed. It is however possible, using
|
||||
|
||||
make install INSTALL_ROOT=$INSTALL_DIRECTORY
|
||||
|
||||
Private Header Dependencies When Compiling With Qt 4.8
|
||||
------------------------------------------------------
|
||||
|
||||
The QNX plugin, and on Windows the Utils library, use
|
||||
private headers of Qt. These private headers always end with an "_p.h". Digia
|
||||
and the Qt Project do not promise to keep these files or APIs binary or source
|
||||
compatible between releases. This means that when compiled, Qt Creator has a
|
||||
dependency to the exact Qt version it was compiled with. Running Qt Creator
|
||||
against updated Qt libraries (also for patch releases) might lead to link time
|
||||
failures, or even crashes.
|
||||
|
||||
To disable the plugins, pass "QT_PRIVATE_HEADERS=" to qmake:
|
||||
|
||||
qmake "QT_PRIVATE_HEADERS=" $SOURCE_DIRECTORY/qtcreator.pro
|
||||
|
||||
Compiling Qt and Qt Creator on Windows
|
||||
--------------------------------------
|
||||
|
||||
|
||||
16
doc/doc.pri
16
doc/doc.pri
@@ -1,15 +1,7 @@
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
HELPGENERATOR = $$targetPath($$[QT_INSTALL_BINS]/qhelpgenerator) -platform minimal
|
||||
QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc)
|
||||
QDOC_GLOBAL = QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS/src] QDOC_INDEX_DIR=$$[QT_INSTALL_DOCS]
|
||||
COMPAT =
|
||||
} else {
|
||||
HELPGENERATOR = $$targetPath($$[QT_INSTALL_BINS]/qhelpgenerator)
|
||||
QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc3)
|
||||
QDOC_GLOBAL = QDOC_INDEX_DIR=dummy # this will be ignored. we don't link qt4 docs any more.
|
||||
COMPAT = -qt4
|
||||
}
|
||||
|
||||
HELPGENERATOR = $$targetPath($$[QT_INSTALL_BINS]/qhelpgenerator) -platform minimal
|
||||
QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc)
|
||||
QDOC_GLOBAL = QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS/src] QDOC_INDEX_DIR=$$[QT_INSTALL_DOCS]
|
||||
COMPAT =
|
||||
|
||||
VERSION_TAG = $$replace(QTCREATOR_VERSION, "[-.]", )
|
||||
|
||||
|
||||
@@ -6,29 +6,7 @@ QTCREATOR_COMPAT_VERSION = 3.2.81
|
||||
BINARY_ARTIFACTS_BRANCH = master
|
||||
|
||||
# enable c++11
|
||||
isEqual(QT_MAJOR_VERSION, 5) {
|
||||
CONFIG += c++11
|
||||
} else {
|
||||
macx {
|
||||
!macx-clang*: error("You need to use the macx-clang or macx-clang-libc++ mkspec to compile Qt Creator (call qmake with '-spec unsupported/macx-clang')")
|
||||
QMAKE_CFLAGS += -mmacosx-version-min=10.7
|
||||
QMAKE_CXXFLAGS += -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7
|
||||
QMAKE_OBJECTIVE_CXXFLAGS += -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7
|
||||
QMAKE_LFLAGS += -stdlib=libc++ -mmacosx-version-min=10.7
|
||||
} else:linux-g++* {
|
||||
QMAKE_CXXFLAGS += -std=c++0x
|
||||
} else:linux-icc* {
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
} else:linux-clang* {
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
QMAKE_LFLAGS += -stdlib=libc++ -lc++abi
|
||||
} else:win32-g++* {
|
||||
QMAKE_CXXFLAGS += -std=c++0x
|
||||
}
|
||||
# nothing to do for MSVC10+
|
||||
}
|
||||
|
||||
isEqual(QT_MAJOR_VERSION, 5) {
|
||||
CONFIG += c++11
|
||||
|
||||
defineReplace(cleanPath) {
|
||||
return($$clean_path($$1))
|
||||
@@ -38,27 +16,6 @@ defineReplace(targetPath) {
|
||||
return($$shell_path($$1))
|
||||
}
|
||||
|
||||
} else { # qt5
|
||||
|
||||
defineReplace(cleanPath) {
|
||||
win32:1 ~= s|\\\\|/|g
|
||||
contains(1, ^/.*):pfx = /
|
||||
else:pfx =
|
||||
segs = $$split(1, /)
|
||||
out =
|
||||
for(seg, segs) {
|
||||
equals(seg, ..):out = $$member(out, 0, -2)
|
||||
else:!equals(seg, .):out += $$seg
|
||||
}
|
||||
return($$join(out, /, $$pfx))
|
||||
}
|
||||
|
||||
defineReplace(targetPath) {
|
||||
return($$replace(1, /, $$QMAKE_DIR_SEP))
|
||||
}
|
||||
|
||||
} # qt5
|
||||
|
||||
defineReplace(qtLibraryName) {
|
||||
unset(LIBRARY_NAME)
|
||||
LIBRARY_NAME = $$1
|
||||
@@ -95,30 +52,11 @@ defineTest(minQtVersion) {
|
||||
return(false)
|
||||
}
|
||||
|
||||
isEqual(QT_MAJOR_VERSION, 5) {
|
||||
|
||||
# For use in custom compilers which just copy files
|
||||
defineReplace(stripSrcDir) {
|
||||
return($$relative_path($$absolute_path($$1, $$OUT_PWD), $$_PRO_FILE_PWD_))
|
||||
}
|
||||
|
||||
} else { # qt5
|
||||
|
||||
# For use in custom compilers which just copy files
|
||||
win32:i_flag = i
|
||||
defineReplace(stripSrcDir) {
|
||||
win32 {
|
||||
!contains(1, ^.:.*):1 = $$OUT_PWD/$$1
|
||||
} else {
|
||||
!contains(1, ^/.*):1 = $$OUT_PWD/$$1
|
||||
}
|
||||
out = $$cleanPath($$1)
|
||||
out ~= s|^$$re_escape($$_PRO_FILE_PWD_/)||$$i_flag
|
||||
return($$out)
|
||||
}
|
||||
|
||||
} # qt5
|
||||
|
||||
!isEmpty(BUILD_TESTS):TEST = 1
|
||||
|
||||
isEmpty(TEST):CONFIG(debug, debug|release) {
|
||||
@@ -208,7 +146,7 @@ win32-msvc* {
|
||||
QMAKE_LFLAGS_DEBUG += /INCREMENTAL:NO
|
||||
}
|
||||
|
||||
qt:greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
qt {
|
||||
contains(QT, core): QT += concurrent
|
||||
contains(QT, gui): QT += widgets
|
||||
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x040900
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
include(qtcreator.pri)
|
||||
|
||||
#version check qt
|
||||
!minQtVersion(4, 8, 0) {
|
||||
!minQtVersion(5, 3, 1) {
|
||||
message("Cannot build Qt Creator with Qt version $${QT_VERSION}.")
|
||||
error("Use at least Qt 4.8.0.")
|
||||
error("Use at least Qt 5.3.1.")
|
||||
}
|
||||
|
||||
include(doc/doc.pri)
|
||||
@@ -28,7 +28,7 @@ OTHER_FILES += dist/copyright_template.txt \
|
||||
$$files(scripts/*.sh) \
|
||||
$$files(scripts/*.pl)
|
||||
|
||||
minQtVersion(5, 0, 0):exists(src/shared/qbs/qbs.pro) {
|
||||
exists(src/shared/qbs/qbs.pro) {
|
||||
# Make sure the qbs dll ends up alongside the Creator executable.
|
||||
QBS_DLLDESTDIR = $${IDE_BUILD_TREE}/bin
|
||||
cache(QBS_DLLDESTDIR)
|
||||
|
||||
@@ -3,11 +3,7 @@ QT += gui network
|
||||
include(../../qtcreatorlibrary.pri)
|
||||
include(utils-lib.pri)
|
||||
|
||||
lessThan(QT_MAJOR_VERSION, 5) {
|
||||
# Needed for QtCore/private/qwineventnotifier_p.h
|
||||
win32:include(../../private_headers.pri)
|
||||
linux-*: DEFINES += QTC_USE_QX11INFO
|
||||
} else:linux-* {
|
||||
linux-* {
|
||||
!isEmpty(QT.x11extras.name) {
|
||||
QT += x11extras
|
||||
CONFIG += x11
|
||||
|
||||
@@ -49,16 +49,16 @@ SUBDIRS = \
|
||||
baremetal \
|
||||
ios \
|
||||
beautifier \
|
||||
qmakeandroidsupport
|
||||
qmakeandroidsupport \
|
||||
winrt \
|
||||
qmldesigner \
|
||||
qmlprofiler \
|
||||
welcome
|
||||
|
||||
minQtVersion(5, 0, 0) {
|
||||
SUBDIRS += winrt
|
||||
|
||||
isEmpty(QBS_INSTALL_DIR): QBS_INSTALL_DIR = $$(QBS_INSTALL_DIR)
|
||||
exists(../shared/qbs/qbs.pro)|!isEmpty(QBS_INSTALL_DIR): \
|
||||
SUBDIRS += \
|
||||
qbsprojectmanager
|
||||
}
|
||||
isEmpty(QBS_INSTALL_DIR): QBS_INSTALL_DIR = $$(QBS_INSTALL_DIR)
|
||||
exists(../shared/qbs/qbs.pro)|!isEmpty(QBS_INSTALL_DIR): \
|
||||
SUBDIRS += \
|
||||
qbsprojectmanager
|
||||
|
||||
# prefer qmake variable set on command line over env var
|
||||
isEmpty(LLVM_INSTALL_DIR):LLVM_INSTALL_DIR=$$(LLVM_INSTALL_DIR)
|
||||
@@ -75,23 +75,6 @@ isEmpty(IDE_PACKAGE_MODE) {
|
||||
updateinfo
|
||||
}
|
||||
|
||||
minQtVersion(5, 3, 1) {
|
||||
SUBDIRS += qmldesigner
|
||||
} else {
|
||||
warning("QmlDesigner plugin has been disabled.")
|
||||
warning("This plugin requires Qt 5.3.1 or newer.")
|
||||
}
|
||||
|
||||
minQtVersion(5, 2, 0) {
|
||||
SUBDIRS += \
|
||||
qmlprofiler \
|
||||
welcome
|
||||
} else {
|
||||
warning("QmlProfiler plugin has been disabled.")
|
||||
warning("Welcome plugin has been disabled.")
|
||||
warning("These plugins need at least Qt 5.2.")
|
||||
}
|
||||
|
||||
for(p, SUBDIRS) {
|
||||
QTC_PLUGIN_DEPENDS =
|
||||
include($$p/$${p}_dependencies.pri)
|
||||
|
||||
@@ -254,20 +254,10 @@ FORMS += \
|
||||
qnxsettingswidget.ui \
|
||||
qnxdeployqtlibrariesdialog.ui
|
||||
|
||||
include(../../private_headers.pri)
|
||||
include(./cascadesimport/cascadesimport.pri)
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
QT += gui-private
|
||||
DEFINES += QNX_ZIP_FILE_SUPPORT
|
||||
} else {
|
||||
exists($${QT_PRIVATE_HEADERS}/QtGui/private/qzipreader_p.h) {
|
||||
DEFINES += QNX_ZIP_FILE_SUPPORT
|
||||
} else {
|
||||
warning("The QNX plugin depends on private headers from QtGui module, to be fully functional.")
|
||||
warning("To fix it, pass 'QT_PRIVATE_HEADERS=$QTDIR/include' to qmake, where $QTDIR is the source directory of qt.")
|
||||
}
|
||||
}
|
||||
QT += gui-private
|
||||
DEFINES += QNX_ZIP_FILE_SUPPORT
|
||||
|
||||
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# Try to find location of Qt private headers (see README)
|
||||
isEmpty(QT_PRIVATE_HEADERS) {
|
||||
QT_PRIVATE_HEADERS = $$[QT_INSTALL_HEADERS]
|
||||
} else {
|
||||
INCLUDEPATH += \
|
||||
$${QT_PRIVATE_HEADERS} \
|
||||
$${QT_PRIVATE_HEADERS}/QtCore \
|
||||
$${QT_PRIVATE_HEADERS}/QtGui \
|
||||
$${QT_PRIVATE_HEADERS}/QtScript \
|
||||
$${QT_PRIVATE_HEADERS}/QtDeclarative
|
||||
}
|
||||
@@ -73,21 +73,10 @@ isEmpty(TARGET) {
|
||||
error("qtcreatorplugin.pri: You must provide a TARGET")
|
||||
}
|
||||
|
||||
isEqual(QT_MAJOR_VERSION, 5) {
|
||||
|
||||
defineReplace(stripOutDir) {
|
||||
return($$relative_path($$1, $$OUT_PWD))
|
||||
}
|
||||
|
||||
} else { # qt5
|
||||
|
||||
defineReplace(stripOutDir) {
|
||||
1 ~= s|^$$re_escape($$OUT_PWD/)||$$i_flag
|
||||
return($$1)
|
||||
}
|
||||
|
||||
} # qt5
|
||||
|
||||
PLUGINSPEC = $$_PRO_FILE_PWD_/$${TARGET}.pluginspec
|
||||
PLUGINSPEC_IN = $${PLUGINSPEC}.in
|
||||
exists($$PLUGINSPEC_IN) {
|
||||
@@ -107,21 +96,19 @@ copy2build.name = COPY ${QMAKE_FILE_IN}
|
||||
copy2build.CONFIG += no_link no_clean
|
||||
QMAKE_EXTRA_COMPILERS += copy2build
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
# Create a Json file containing the plugin information required by
|
||||
# Qt 5's plugin system by running a XSLT sheet on the
|
||||
# pluginspec file before moc runs.
|
||||
XMLPATTERNS = $$targetPath($$[QT_INSTALL_BINS]/xmlpatterns)
|
||||
XMLPATTERNS = $$targetPath($$[QT_INSTALL_BINS]/xmlpatterns)
|
||||
|
||||
pluginspec2json.name = Create Qt 5 plugin json file
|
||||
pluginspec2json.input = PLUGINSPEC
|
||||
pluginspec2json.variable_out = GENERATED_FILES
|
||||
pluginspec2json.output = $${TARGET}.json
|
||||
pluginspec2json.commands = $$XMLPATTERNS -no-format -output $$pluginspec2json.output $$PWD/qtcreatorplugin2json.xsl $$PLUGINSPEC
|
||||
pluginspec2json.CONFIG += no_link
|
||||
moc_header.depends += $$pluginspec2json.output
|
||||
QMAKE_EXTRA_COMPILERS += pluginspec2json
|
||||
}
|
||||
pluginspec2json.name = Create Qt 5 plugin json file
|
||||
pluginspec2json.input = PLUGINSPEC
|
||||
pluginspec2json.variable_out = GENERATED_FILES
|
||||
pluginspec2json.output = $${TARGET}.json
|
||||
pluginspec2json.commands = $$XMLPATTERNS -no-format -output $$pluginspec2json.output $$PWD/qtcreatorplugin2json.xsl $$PLUGINSPEC
|
||||
pluginspec2json.CONFIG += no_link
|
||||
moc_header.depends += $$pluginspec2json.output
|
||||
QMAKE_EXTRA_COMPILERS += pluginspec2json
|
||||
|
||||
macx {
|
||||
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/PlugIns/
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
TEMPLATE = subdirs
|
||||
|
||||
include(../../../qtcreator.pri)
|
||||
include(../../private_headers.pri)
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
qtHaveModule(declarative-private) {
|
||||
QT += declarative-private core-private
|
||||
SUBDIRS += qmlpuppet
|
||||
}
|
||||
} else {
|
||||
exists($${QT_PRIVATE_HEADERS}/QtDeclarative/private/qdeclarativecontext_p.h) {
|
||||
minQtVersion(4, 7, 1) {
|
||||
SUBDIRS += qmlpuppet
|
||||
}
|
||||
}
|
||||
qtHaveModule(declarative-private) {
|
||||
QT += declarative-private core-private
|
||||
SUBDIRS += qmlpuppet
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ TARGET = qmlpuppet
|
||||
TEMPLATE = app
|
||||
|
||||
include(../../../../qtcreator.pri)
|
||||
include(../../../private_headers.pri)
|
||||
DESTDIR = $$IDE_BIN_PATH
|
||||
include(../../../rpath.pri)
|
||||
|
||||
|
||||
@@ -5,6 +5,5 @@ QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
|
||||
include($${QT_BREAKPAD_ROOT_PATH}/qtcrashhandler.pri)
|
||||
|
||||
include(../../../qtcreator.pri)
|
||||
include(../../private_headers.pri)
|
||||
DESTDIR = $$IDE_BIN_PATH
|
||||
include(../../rpath.pri)
|
||||
include(../../rpath.pri)
|
||||
|
||||
@@ -2,9 +2,6 @@ QT -= gui widgets
|
||||
include(../qttest.pri)
|
||||
include(../../../src/private_headers.pri)
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
greaterThan(QT_MINOR_VERSION, 1): QT += core_private
|
||||
else: QT += core-private
|
||||
}
|
||||
QT += core-private
|
||||
|
||||
SOURCES += tst_offsets.cpp
|
||||
|
||||
Reference in New Issue
Block a user