Commit 3ad90ea8 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen Committed by The Qt Project
Browse files

Generate a proper static QtBootstrap module


Making a properly installed libQtBootstrap simplifies
our tools build process a little and in addition allows
other comand line tools to use the bootstrap lib and
link against it.

Initial-version-by: Lars Knoll
Change-Id: Iddf4568a5505bc24898ec1abf7e7022e19f0a454
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@digia.com>
parent f1841d86
dev 5.10 5.11 5.12 5.12.1 5.12.10 5.12.11 5.12.12 5.12.2 5.12.3 5.12.4 5.12.5 5.12.6 5.12.7 5.12.8 5.12.9 5.13 5.13.0 5.13.1 5.13.2 5.14 5.14.0 5.14.1 5.14.2 5.15 5.15.0 5.15.1 5.15.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.9.8 6.0 6.0.0 6.1 6.1.0 6.1.1 6.1.2 6.1.3 6.2 6.2.0 6.2.1 6.2.2 old/5.0 old/5.1 old/5.2 wip/cmake wip/highdpi wip/lite wip/mir wip/nacl wip/network-test-server wip/remac wip/tizen wip/webassembly v5.15.0-alpha1 v5.14.1 v5.14.0 v5.14.0-rc2 v5.14.0-rc1 v5.14.0-beta3 v5.14.0-beta2 v5.14.0-beta1 v5.14.0-alpha1 v5.13.2 v5.13.1 v5.13.0 v5.13.0-rc3 v5.13.0-rc2 v5.13.0-rc1 v5.13.0-beta4 v5.13.0-beta3 v5.13.0-beta2 v5.13.0-beta1 v5.13.0-alpha1 v5.12.7 v5.12.6 v5.12.5 v5.12.4 v5.12.3 v5.12.2 v5.12.1 v5.12.0 v5.12.0-rc2 v5.12.0-rc1 v5.12.0-beta4 v5.12.0-beta3 v5.12.0-beta2 v5.12.0-beta1 v5.12.0-alpha1 v5.11.3 v5.11.2 v5.11.1 v5.11.0 v5.11.0-rc2 v5.11.0-rc1 v5.11.0-beta4 v5.11.0-beta3 v5.11.0-beta2 v5.11.0-beta1 v5.11.0-alpha1 v5.10.1 v5.10.0 v5.10.0-rc3 v5.10.0-rc2 v5.10.0-rc1 v5.10.0-beta4 v5.10.0-beta3 v5.10.0-beta2 v5.10.0-beta1 v5.10.0-alpha1 v5.9.9 v5.9.8 v5.9.7 v5.9.6 v5.9.5 v5.9.4 v5.9.3 v5.9.2 v5.9.1 v5.9.0 v5.9.0-rc2 v5.9.0-rc1 v5.9.0-beta4 v5.9.0-beta3 v5.9.0-beta2 v5.9.0-beta1 v5.9.0-alpha1 v5.8.0 v5.8.0-rc1 v5.8.0-beta1 v5.8.0-alpha1 v5.7.1 v5.7.0 v5.7.0-rc1 v5.7.0-beta1 v5.7.0-alpha1 v5.6.3 v5.6.2 v5.6.1 v5.6.1-1 v5.6.0 v5.6.0-rc1 v5.6.0-beta1 v5.6.0-alpha1 v5.5.1 v5.5.0 v5.5.0-rc1 v5.5.0-beta1 v5.5.0-alpha1 v5.4.2 v5.4.1 v5.4.0 v5.4.0-rc1 v5.4.0-beta1 v5.4.0-alpha1 v5.3.2 v5.3.1 v5.3.0 v5.3.0-rc1 v5.3.0-beta1 v5.3.0-alpha1 v5.2.1 v5.2.0 v5.2.0-rc1 v5.2.0-beta1 v5.2.0-alpha1 v5.1.1 v5.1.0 v5.1.0-rc2 v5.1.0-rc1 v5.1.0-beta1 v5.1.0-alpha1 v5.0.2 v5.0.1 v5.0.0 v5.0.0-rc2 v5.0.0-rc1
No related merge requests found
Showing with 51 additions and 106 deletions
......@@ -12,8 +12,8 @@ isEmpty(MODULE):MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0)
isEmpty(VERSION):VERSION = $$QT_VERSION
# Compile as shared/DLL or static according to the option given to configure
# unless overridden
staticlib: CONFIG += static
# unless overridden. Host builds are always static
host_build|staticlib: CONFIG += static
!static:!shared {
contains(QT_CONFIG, static): \
CONFIG += static
......@@ -62,6 +62,11 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri
module_config = "QT.$${MODULE}.CONFIG = $$MODULE_CONFIG"
else: \
module_config =
!no_module_headers {
MODULE_INCLUDES = "\$\$QT_MODULE_INCLUDE_BASE \$\$QT_MODULE_INCLUDE_BASE/$$TARGET"
MODULE_PRIVATE_INCLUDES = "\$\$QT_MODULE_INCLUDE_BASE/$$TARGET/\$\$QT.$${MODULE}.VERSION \
\$\$QT_MODULE_INCLUDE_BASE/$$TARGET/\$\$QT.$${MODULE}.VERSION/$$TARGET"
}
MODULE_PRI_CONT = \
"QT.$${MODULE}.VERSION = $${VERSION}" \
"QT.$${MODULE}.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \
......@@ -70,9 +75,8 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri
"" \
"QT.$${MODULE}.name = $$TARGET" \
"QT.$${MODULE}.bins = \$\$QT_MODULE_BIN_BASE" \
"QT.$${MODULE}.includes = \$\$QT_MODULE_INCLUDE_BASE \$\$QT_MODULE_INCLUDE_BASE/$$TARGET" \
"QT.$${MODULE}.private_includes = \$\$QT_MODULE_INCLUDE_BASE/$$TARGET/\$\$QT.$${MODULE}.VERSION \
\$\$QT_MODULE_INCLUDE_BASE/$$TARGET/\$\$QT.$${MODULE}.VERSION/$$TARGET" \
"QT.$${MODULE}.includes = $$MODULE_INCLUDES" \
"QT.$${MODULE}.private_includes = $$MODULE_PRIVATE_INCLUDES" \
"QT.$${MODULE}.sources = $$val_escape(_PRO_FILE_PWD_)" \
"QT.$${MODULE}.libs = \$\$QT_MODULE_LIB_BASE" \
"QT.$${MODULE}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \
......@@ -94,7 +98,7 @@ load(qt_module_fwdpri)
INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}.private_includes)
load(qt_module_headers)
!no_module_headers: load(qt_module_headers)
#other
TEMPLATE = lib
......@@ -116,7 +120,8 @@ CONFIG += qmake_cache target_qt
}
# If Qt was configured with -debug-and-release then build the module the same way
if(win32|mac):!macx-xcode {
# - unless this is a host library
!host_build:if(win32|mac):!macx-xcode {
contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
contains(QT_CONFIG, build_all):CONFIG += build_all
}
......
CONFIG += console qtinc
CONFIG -= qt
!build_pass:contains(QT_CONFIG, build_all):CONFIG += release
CONFIG -= app_bundle
CONFIG += exceptions_off
DEFINES += \
QT_BOOTSTRAPPED \
QT_LITE_UNICODE \
QT_NO_CAST_FROM_ASCII \
QT_NO_CAST_TO_ASCII \
QT_NO_CODECS \
QT_NO_DATASTREAM \
QT_NO_LIBRARY \
QT_NO_QOBJECT \
QT_NO_SYSTEMLOCALE \
QT_NO_THREAD \
QT_NO_UNICODETABLES \
QT_NO_USING_NAMESPACE \
QT_NO_DEPRECATED
INCLUDEPATH += $$QT_BUILD_TREE/include \
$$QT_BUILD_TREE/include/QtCore \
$$QT_BUILD_TREE/include/QtCore/$$QT_VERSION \
$$QT_BUILD_TREE/include/QtCore/$$QT_VERSION/QtCore
DEPENDPATH += $$INCLUDEPATH \
$$QT_SOURCE_TREE/src/corelib/global \
$$QT_SOURCE_TREE/src/corelib/kernel \
$$QT_SOURCE_TREE/src/corelib/tools \
$$QT_SOURCE_TREE/src/corelib/io \
$$QT_SOURCE_TREE/src/corelib/codecs
hpux-acc*|hpuxi-acc* {
LIBS += $$QT_BUILD_TREE/src/tools/bootstrap/libbootstrap.a
} else {
contains(CONFIG, debug_and_release_target) {
CONFIG(debug, debug|release) {
QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap/debug
} else {
QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap/release
}
} else {
QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap
}
LIBS += -lbootstrap
}
!contains(QT_CONFIG, zlib):!contains(QT_CONFIG, no-zlib):!cross_compile {
include($$PWD/../../3rdparty/zlib_dependency.pri)
}
win32:LIBS += -luser32 -lole32 -ladvapi32
mac {
CONFIG -= incremental
LIBS += -framework CoreServices
}
# Make dummy "sis" and "freeze" target to keep recursive "make sis/freeze" working.
sis_target.target = sis
sis_target.commands =
sis_target.depends = first
QMAKE_EXTRA_TARGETS += sis_target
freeze_target.target = freeze
freeze_target.commands =
freeze_target.depends = first
QMAKE_EXTRA_TARGETS += freeze_target
option(host_build)
TEMPLATE = lib
TARGET = bootstrap
CONFIG += static
CONFIG += console qtinc
CONFIG -= qt
CONFIG += exceptions_off
!build_pass:contains(QT_CONFIG, build_all):CONFIG += release
mac:CONFIG -= app_bundle incremental
TARGET = QtBootstrap
QT =
CONFIG += no_module_headers internal_module
DEFINES += \
MODULE_DEFINES = \
QT_BOOTSTRAPPED \
QT_LITE_UNICODE \
QT_NO_CAST_FROM_ASCII \
QT_NO_CAST_TO_ASCII \
QT_NO_CODECS \
QT_NO_DATASTREAM \
......@@ -25,11 +19,22 @@ DEFINES += \
QT_NO_DEPRECATED \
QT_QMAKE_LOCATION=\\\"$$QMAKE_QMAKE\\\"
INCLUDEPATH += $$QT_BUILD_TREE/include \
$$QT_BUILD_TREE/include/QtCore \
$$QT_BUILD_TREE/include/QtCore/$$QT_VERSION \
$$QT_BUILD_TREE/include/QtCore/$$QT_VERSION/QtCore \
$$QT_BUILD_TREE/src/corelib/global
DEFINES += \
$$MODULE_DEFINES \
QT_NO_CAST_FROM_ASCII
MODULE_CONFIG = console -app_bundle release
MODULE_PRIVATE_INCLUDES = \
\$\$QT_MODULE_INCLUDE_BASE \
\$\$QT_MODULE_INCLUDE_BASE/QtCore \
\$\$QT_MODULE_INCLUDE_BASE/QtCore/$$QT_VERSION \
\$\$QT_MODULE_INCLUDE_BASE/QtCore/$$QT_VERSION/QtCore
qtProcessModuleFlags(CONFIG, MODULE_CONFIG)
load(qt_module)
INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global
DEPENDPATH += $$INCLUDEPATH \
../../corelib/global \
......@@ -119,6 +124,8 @@ macx: {
if(contains(QT_CONFIG, zlib)|cross_compile):include(../../3rdparty/zlib.pri)
else:include(../../3rdparty/zlib_dependency.pri)
win32:LIBS += -luser32 -lole32 -ladvapi32
lib.CONFIG = dummy_install
INSTALLS += lib
......
option(host_build)
TEMPLATE = app
TARGET = moc
TEMPLATE = app
TARGET = moc
QT = bootstrap-private
DEFINES += QT_MOC QT_NO_CAST_FROM_BYTEARRAY QT_NO_COMPRESS
DESTDIR = ../../../bin
INCLUDEPATH += $$OUT_PWD/../../corelib/global
DEPENDPATH += $$OUT_PWD/../../corelib/global
LIBS =
OBJECTS_DIR = .
DEFINES += QT_MOC QT_NO_CAST_FROM_ASCII QT_NO_CAST_FROM_BYTEARRAY QT_NO_COMPRESS
DESTDIR = ../../../bin
INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global
include(moc.pri)
HEADERS += qdatetime_p.h
SOURCES += main.cpp
include(../bootstrap/bootstrap.pri)
target.path = $$[QT_HOST_BINS]
INSTALLS += target
......
option(host_build)
TEMPLATE = app
TARGET = qdbuscpp2xml
QT = bootstrap-private
DESTDIR = ../../../bin
include(../moc/moc.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
INCLUDEPATH += $$QT_BUILD_TREE/include \
$$QT_BUILD_TREE/include/QtDBus \
$$QT_BUILD_TREE/include/QtDBus/$$QT_VERSION \
......@@ -26,8 +29,6 @@ SOURCES += qdbuscpp2xml.cpp \
$$QT_SOURCE_TREE/src/dbus/qdbus_symbols.cpp \
$$QT_SOURCE_TREE/src/dbus/qdbusunixfiledescriptor.cpp
include(../bootstrap/bootstrap.pri)
target.path = $$[QT_HOST_BINS]
INSTALLS += target
load(qt_targets)
option(host_build)
TEMPLATE = app
TARGET = qdbusxml2cpp
QT = bootstrap-private
DESTDIR = ../../../bin
include(../bootstrap/bootstrap.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
INCLUDEPATH += $$QT_BUILD_TREE/include \
$$QT_BUILD_TREE/include/QtDBus \
......
option(host_build)
TEMPLATE = app
TARGET = qdoc
QT = bootstrap-private
DESTDIR = ../../../bin
DEFINES += QDOC2_COMPAT
include(../bootstrap/bootstrap.pri)
DEFINES -= QT_NO_CAST_FROM_ASCII
DEFINES += QT_NO_TRANSLATION
INCLUDEPATH += $$QT_SOURCE_TREE/src/tools/qdoc \
......
option(host_build)
TEMPLATE = app
TARGET = rcc
QT = bootstrap-private
DESTDIR = ../../../bin
DEFINES += QT_RCC
DEFINES += QT_RCC QT_NO_CAST_FROM_ASCII
include(rcc.pri)
HEADERS += ../../corelib/kernel/qcorecmdlineargs_p.h
SOURCES += main.cpp
include(../bootstrap/bootstrap.pri)
target.path = $$[QT_HOST_BINS]
INSTALLS += target
......
option(host_build)
TEMPLATE = app
TARGET = uic
QT = bootstrap-private
DESTDIR = ../../../bin
DEFINES += QT_UIC
DEFINES += QT_UIC QT_NO_CAST_FROM_ASCII
include(uic.pri)
include(cpp/cpp.pri)
......@@ -19,8 +20,6 @@ SOURCES += main.cpp \
QMAKE_CXXFLAGS_RELEASE -= -O2
}
include(../bootstrap/bootstrap.pri)
target.path = $$[QT_HOST_BINS]
INSTALLS += target
load(qt_targets)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment