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: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
f1841d864d
commit
3ad90ea8f6
@ -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
|
||||
}
|
||||
|
@ -1,65 +0,0 @@
|
||||
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
|
@ -1,18 +1,12 @@
|
||||
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
|
||||
|
||||
|
@ -1,18 +1,16 @@
|
||||
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
|
||||
|
@ -1,11 +1,14 @@
|
||||
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)
|
||||
|
@ -1,10 +1,11 @@
|
||||
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 \
|
||||
|
@ -1,12 +1,11 @@
|
||||
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 \
|
||||
|
@ -1,14 +1,14 @@
|
||||
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
|
||||
|
@ -1,9 +1,10 @@
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user