97fcf3bc98
Based on the Necessitas project by Bogdan Vatra. Contributors to the Qt5 project: BogDan Vatra <bogdan@kde.org> Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> hjk <hjk121@nokiamail.com> Oswald Buddenhagen <oswald.buddenhagen@digia.com> Paul Olav Tvete <paul.tvete@digia.com> Robin Burchell <robin+qt@viroteck.net> Samuel Rødal <samuel.rodal@digia.com> Yoann Lopes <yoann.lopes@digia.com> The full history of the Qt5 port can be found in refs/old-heads/android, SHA-1 249ca9ca2c7d876b91b31df9434dde47f9065d0d Change-Id: Iff1a7b2dbb707c986f2639e65e39ed8f22430120 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
170 lines
5.3 KiB
Plaintext
170 lines
5.3 KiB
Plaintext
#
|
|
# W A R N I N G
|
|
# -------------
|
|
#
|
|
# This file is not part of the Qt API. It exists purely as an
|
|
# implementation detail. It may change from version to version
|
|
# without notice, or even be removed.
|
|
#
|
|
# We mean it.
|
|
#
|
|
|
|
!no_qt_module_warning:!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri) {
|
|
QMAKE_ACTUAL_PRO_FILE = $$basename(_PRO_FILE_)
|
|
isEmpty(QMAKE_ACTUAL_PRO_FILE): QMAKE_ACTUAL_PRO_FILE=.pro
|
|
warning("You should probably load(qt_build_config) first in $$QMAKE_ACTUAL_PRO_FILE for $$TARGET, as the latter also load()s qt_module.")
|
|
message("Not doing so may lead to qt_module.prf overriding compiler/linker options in your .pro file.")
|
|
message("Ignore this warning with CONFIG+=no_qt_module_warning if you know what you are doing.")
|
|
unset(QMAKE_ACTUAL_PRO_FILE)
|
|
}
|
|
load(qt_build_config) # loads qmodule.pri if hasn't been loaded already
|
|
|
|
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. Host builds are always static
|
|
host_build|staticlib: CONFIG += static
|
|
|
|
ucmodule = $$upper($$MODULE)
|
|
|
|
isEmpty(MODULE_INCNAME): MODULE_INCNAME = $$TARGET
|
|
|
|
MODULE_DEPENDS = $$replace(QT, -private$, )
|
|
MODULE_DEPENDS = $$unique(MODULE_DEPENDS)
|
|
|
|
contains(TARGET, QtAddOn.*): \
|
|
MODULE_DEFINE = QT_ADDON_$${ucmodule}_LIB
|
|
else: \
|
|
MODULE_DEFINE = QT_$${ucmodule}_LIB
|
|
MODULE_DEFINES = $$MODULE_DEFINE $$MODULE_DEFINES
|
|
|
|
load(qt_module_pris)
|
|
|
|
INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}.private_includes)
|
|
|
|
!no_module_headers: load(qt_module_headers)
|
|
|
|
#other
|
|
TEMPLATE = lib
|
|
DESTDIR = $$eval(QT.$${MODULE}.libs)
|
|
win32:!wince*:!prefix_build: DLLDESTDIR = $$eval(QT.$${MODULE}.bins)
|
|
|
|
CONFIG += qmake_cache target_qt
|
|
|
|
QMAKE_DOCS_TARGETDIR = qt$${MODULE}
|
|
|
|
# If Qt was configured with -debug-and-release then build the module the same way
|
|
# - 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
|
|
}
|
|
|
|
linux*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
|
|
|
|
QT += $$QT_FOR_PRIVATE
|
|
unset(QT_FOR_PRIVATE)
|
|
|
|
!internal_module:CONFIG += create_cmake
|
|
|
|
contains(TARGET, QtAddOn.*): \
|
|
DEFINES += QT_BUILD_ADDON_$${ucmodule}_LIB
|
|
else: \
|
|
DEFINES += QT_BUILD_$${ucmodule}_LIB
|
|
|
|
#mac frameworks
|
|
mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) {
|
|
#QMAKE_FRAMEWORK_VERSION = 4.0
|
|
CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
|
|
CONFIG(release, debug|release) {
|
|
!debug_and_release|build_pass {
|
|
CONFIG -= qt_install_headers #no need to install these as well
|
|
FRAMEWORK_HEADERS.version = Versions
|
|
FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
|
|
FRAMEWORK_HEADERS.path = Headers
|
|
}
|
|
QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
|
|
}
|
|
}
|
|
|
|
mac {
|
|
CONFIG += explicitlib
|
|
macx-g++ {
|
|
QMAKE_CFLAGS += -fconstant-cfstrings
|
|
QMAKE_CXXFLAGS += -fconstant-cfstrings
|
|
}
|
|
}
|
|
|
|
DEFINES += QT_BUILDING_QT
|
|
win32 {
|
|
INCLUDEPATH += tmp
|
|
CONFIG += skip_target_version_ext
|
|
}
|
|
|
|
aix-g++* {
|
|
QMAKE_CFLAGS += -mminimal-toc
|
|
QMAKE_CXXFLAGS += -mminimal-toc
|
|
}
|
|
|
|
android: CONFIG += qt_android_deps
|
|
|
|
#install directives
|
|
load(qt_installs)
|
|
|
|
unix|win32-g++* {
|
|
CONFIG += create_pc
|
|
QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS/raw]
|
|
QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]
|
|
QMAKE_PKGCONFIG_CFLAGS = -I${includedir}/$$MODULE_INCNAME
|
|
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
|
|
!isEmpty(_QMAKE_SUPER_CACHE_): \
|
|
rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]*
|
|
else: \
|
|
rplbase = $$MODULE_QMAKE_OUTDIR
|
|
include_replace.match = $$rplbase/include
|
|
include_replace.replace = $$[QT_INSTALL_HEADERS/raw]
|
|
lib_replace.match = $$rplbase/lib
|
|
lib_replace.replace = $$[QT_INSTALL_LIBS/raw]
|
|
QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace
|
|
QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace
|
|
}
|
|
|
|
unix {
|
|
CONFIG += create_libtool explicitlib
|
|
QMAKE_LIBTOOL_LIBDIR = $$[QT_INSTALL_LIBS/raw]
|
|
QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace
|
|
}
|
|
|
|
unix|win32-g++* {
|
|
QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$section(VERSION, ., 0, 0) ")
|
|
QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$section(VERSION, ., 0, 0))
|
|
for(i, MODULE_DEPENDS): \
|
|
QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$eval(QT.$${i}.MAJOR_VERSION))
|
|
isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \
|
|
QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module
|
|
}
|
|
|
|
contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE
|
|
DEFINES *= QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS
|
|
DEFINES *= QT_MOC_COMPAT #we don't need warnings from calling moc code in our generated code
|
|
DEFINES *= QT_USE_QSTRINGBUILDER
|
|
DEFINES *= QT_DEPRECATED_WARNINGS
|
|
|
|
win32 {
|
|
# On Windows, due to the way DLLs work, we need to export all functions,
|
|
# including the inlines
|
|
DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x040800
|
|
} else {
|
|
# On other platforms, Qt's own compilation goes needs to compile the Qt 5.0 API
|
|
DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x050000
|
|
}
|
|
|
|
TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end
|
|
|
|
load(qt_targets)
|
|
load(qt_common)
|
|
|
|
win32:DEFINES+=_USE_MATH_DEFINES
|
|
|