summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-03-20 23:30:31 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-20 23:30:31 +0100
commite5a11fbb3251a98fafd6bebf0b6fc366acb19088 (patch)
tree8e1bd6704205307e0a23484221ea1bb67a9f411e /mkspecs/features
parent0646d1131b4bc65cdd9af29f4ce00fdd2398a3df (diff)
parent76c0be34cd4ff4564693162fa7528463e23ce9d8 (diff)
Merge "Merge branch 'dev' into stable" into refs/staging/stable
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/android.prf14
-rw-r--r--mkspecs/features/configure.prf3
-rw-r--r--mkspecs/features/create_cmake.prf2
-rw-r--r--mkspecs/features/default_post.prf8
-rw-r--r--mkspecs/features/ios/default_post.prf69
-rw-r--r--mkspecs/features/ios/default_pre.prf4
-rw-r--r--mkspecs/features/java.prf61
-rw-r--r--mkspecs/features/mac/sdk.prf59
-rw-r--r--mkspecs/features/qml_plugin.prf24
-rw-r--r--mkspecs/features/qmltestcase.prf2
-rw-r--r--mkspecs/features/qpa/basicunixfontdatabase.prf2
-rw-r--r--mkspecs/features/qpa/genericunixfontdatabase.prf2
-rw-r--r--mkspecs/features/qt_android_deps.prf53
-rw-r--r--mkspecs/features/qt_build_config.prf3
-rw-r--r--mkspecs/features/qt_common.prf54
-rw-r--r--mkspecs/features/qt_module.prf21
-rw-r--r--mkspecs/features/qt_module_headers.prf15
-rw-r--r--mkspecs/features/qt_module_pris.prf2
-rw-r--r--mkspecs/features/qt_plugin.prf5
-rw-r--r--mkspecs/features/qt_tool.prf14
-rw-r--r--mkspecs/features/resolve_target.prf2
-rw-r--r--mkspecs/features/testcase.prf2
-rw-r--r--mkspecs/features/unix/opengl.prf2
-rw-r--r--mkspecs/features/unix/separate_debug_info.prf13
-rw-r--r--mkspecs/features/win32/opengl.prf1
25 files changed, 391 insertions, 46 deletions
diff --git a/mkspecs/features/android.prf b/mkspecs/features/android.prf
new file mode 100644
index 0000000000..2a3086d4ad
--- /dev/null
+++ b/mkspecs/features/android.prf
@@ -0,0 +1,14 @@
+contains(TEMPLATE, ".*app") {
+ !android_app {
+ !contains(TARGET, ".so"): TARGET = lib$${TARGET}.so
+ QMAKE_LFLAGS += -Wl,-soname,$$TARGET
+ }
+}
+!QTDIR_build:android_install {
+ isEmpty(QT_BUILD_TREE) {
+ target.path=/libs/$$ANDROID_TARGET_ARCH/
+ } else {
+ target.path = /
+ }
+ INSTALLS *= target
+}
diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
index 39144e7216..b4569df6d5 100644
--- a/mkspecs/features/configure.prf
+++ b/mkspecs/features/configure.prf
@@ -7,6 +7,9 @@ equals(MAKEFILE_GENERATOR, UNIX) {
QMAKE_MAKE = mingw32-make
} else:if(equals(MAKEFILE_GENERATOR, MSVC.NET)|equals(MAKEFILE_GENERATOR, MSBUILD)) {
QMAKE_MAKE = nmake
+} else:ios {
+ # iOS unsets MAKEFILE_GENERATOR in its default_pre.prf
+ QMAKE_MAKE = make
} else {
error("Configure tests are not supported with the $$MAKEFILE_GENERATOR Makefile generator.")
}
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 428a3a4d43..9aef37472f 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -69,7 +69,7 @@ CMAKE_MKSPEC = $$[QMAKE_XSPEC]
CMAKE_QT_STEM = Qt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}
-macx {
+mac {
!isEmpty(CMAKE_STATIC_TYPE) {
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index cdd200e80b..c756455dd2 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -47,6 +47,14 @@ incredibuild_xge {
CONFIG = incredibuild_xge $$CONFIG
}
+silent {
+ # Ensure that we process silent.prf last, as it will mangle QMAKE_CXX
+ # and friends in a way that some of the other features (sdk.prf and
+ # simd.prf eg) do not handle.
+ CONFIG -= silent
+ CONFIG = silent $$CONFIG
+}
+
force_debug_info:win32 {
load(resolve_target)
QMAKE_CLEAN += $$replace(QMAKE_RESOLVED_TARGET, ...$, pdb) # for the debug case it is hardcoded in qmake
diff --git a/mkspecs/features/ios/default_post.prf b/mkspecs/features/ios/default_post.prf
new file mode 100644
index 0000000000..e9d2149351
--- /dev/null
+++ b/mkspecs/features/ios/default_post.prf
@@ -0,0 +1,69 @@
+
+CONFIG(qt):contains(QT, gui):equals(TEMPLATE, app): CONFIG += gui_app
+
+isEmpty(MAKEFILE_GENERATOR) {
+ gui_app:app_bundle: \
+ # For applications we want Xcode project files
+ MAKEFILE_GENERATOR = XCODE
+ else: \
+ # For libs, etc we still want regular Makefiles
+ MAKEFILE_GENERATOR = UNIX
+}
+
+gui_app {
+ # We have to do the link and dependency resolution for the platform plugin
+ # manually, since QTPLUGIN and the prl lookup logic does not support
+ # the -force_load link style. The -force_load option ensures that all
+ # symbols from the static library are included, not just the ones the
+ # linker have seen a use for so far. We need this because we load the platform
+ # plugin from the platform plugin itself, using Q_IMPORT_PLUGIN.
+ lib_path_and_base = $$[QT_INSTALL_PLUGINS/get]/platforms/libqios$$qtPlatformTargetSuffix()
+ LIBS += "-force_load $${lib_path_and_base}.$${QMAKE_EXTENSION_STATICLIB}"
+ LIBS += $$fromfile($${lib_path_and_base}.prl, QMAKE_PRL_LIBS)
+
+ # Which means we don't want the auto-generated import for the platform plugin
+ CONFIG -= import_qpa_plugin
+
+ !no_main_wrapper {
+ # We link the iosmain library manually as well, since it's not really a plugin
+ lib_name = qiosmain
+ lib_path_and_base = $$[QT_INSTALL_PLUGINS/get]/platforms/lib$${lib_name}$$qtPlatformTargetSuffix()
+ LIBS += -L$$[QT_INSTALL_PLUGINS/get]/platforms -l$${lib_name}$$qtPlatformTargetSuffix()
+ LIBS += $$fromfile($${lib_path_and_base}.prl, QMAKE_PRL_LIBS)
+ DEFINES += main=qt_main
+ }
+}
+
+contains(MAKEFILE_GENERATOR, XCODE) {
+ ios_device_family.name = TARGETED_DEVICE_FAMILY
+ ios_device_family.value = $$QMAKE_IOS_TARGETED_DEVICE_FAMILY
+ QMAKE_MAC_XCODE_SETTINGS += ios_device_family
+}
+
+isEmpty(QT_ARCH) {
+ # The iPhoneOS and iPhoneSimulator targets share the same toolchain,
+ # so when configure runs the arch tests it passes the correct sysroot,
+ # but we fail to pick up the architecture since we're not passing -arch
+ # yet. Xcode does not seem to have a way to run the shared toolchain
+ # in a way that will automatically do this (for example xcrun -sdk).
+ contains(QMAKE_MAC_SDK, iphoneos.*): QT_ARCH = armv7
+ else: QT_ARCH = i386 # Simulator
+} else {
+ # Fix up the QT_ARCH to be more specific
+ equals(QT_ARCH, arm) {
+ # Samsung S5PC100, Apple A4, A5, A5X
+ QT_ARCH = armv7
+
+ # FIXME: How do we support armv7s when Qt can't do universal builds?
+ }
+}
+
+!equals(MAKEFILE_GENERATOR, XCODE) {
+ arch_flag = -arch $$QT_ARCH
+ QMAKE_CFLAGS += $$arch_flag
+ QMAKE_CXXFLAGS += $$arch_flag
+ QMAKE_OBJECTIVE_CFLAGS += $$arch_flag
+ QMAKE_LFLAGS += $$arch_flag
+}
+
+load(default_post)
diff --git a/mkspecs/features/ios/default_pre.prf b/mkspecs/features/ios/default_pre.prf
new file mode 100644
index 0000000000..e2956bd77d
--- /dev/null
+++ b/mkspecs/features/ios/default_pre.prf
@@ -0,0 +1,4 @@
+# Unset makefile generator, so we can auto-detect value in default_post
+unset(MAKEFILE_GENERATOR)
+
+load(default_pre)
diff --git a/mkspecs/features/java.prf b/mkspecs/features/java.prf
new file mode 100644
index 0000000000..05350db48d
--- /dev/null
+++ b/mkspecs/features/java.prf
@@ -0,0 +1,61 @@
+TEMPLATE = lib
+android {
+ isEmpty(SDK_ROOT): SDK_ROOT = $$(ANDROID_SDK_ROOT)
+ isEmpty(SDK_ROOT): SDK_ROOT = $$DEFAULT_ANDROID_SDK_ROOT
+ isEmpty(API_VERSION) {
+ API_VERSION = $$(ANDROID_API_VERSION)
+ isEmpty(API_VERSION): API_VERSION = android-10
+ }
+
+ !exists($$SDK_ROOT/platforms/$$API_VERSION/android.jar) {
+ error("The Path $$SDK_ROOT/platforms/$$API_VERSION/android.jar does not exist. Make sure the ANDROID_SDK_ROOT and ANDROID_API_VERSION environment variables are correctly set.")
+ }
+ JAVACLASSPATH += $$SDK_ROOT/platforms/$$API_VERSION/android.jar
+
+ # FIXME: This is a hack to work around some hardcoded values in the android.prf. The
+ # android.prf should be fixed and this should be removed.
+ CONFIG += android_app
+}
+
+isEmpty(CLASS_DIR): CLASS_DIR = .classes
+
+CONFIG -= qt
+
+# Without these, qmake adds a name prefix and versioning postfixes (as well as file
+# links) to the target. This is hardcoded in the qmake code, so for now we use
+# the plugin configs to get what we want.
+CONFIG += plugin no_plugin_name_prefix
+
+javac.input = JAVASOURCES
+javac.output = $$CLASS_DIR
+javac.CONFIG += combine
+javac.commands = javac -source 6 -target 6 -cp $$shell_quote($$join(JAVACLASSPATH, ":")) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN}
+# Force rebuild every time, because we don't know the paths of the destination files
+# as they depend on the code.
+javac.depends = FORCE
+QMAKE_EXTRA_COMPILERS += javac
+
+mkpath($$absolute_path($$CLASS_DIR, $$OUT_PWD)) | error("Aborting.")
+
+# Disable all linker flags since we are overriding the regular linker
+QMAKE_LFLAGS =
+QMAKE_CFLAGS =
+QMAKE_LFLAGS_RPATH =
+QMAKE_LFLAGS_PLUGIN =
+QMAKE_LIBS =
+QMAKE_LIBS_OPENGL_ES2 =
+QMAKE_LIBDIR =
+QMAKE_EXTENSION_SHLIB = jar
+
+# Override linker with dex (for Android) or jar (for other java builds)
+android {
+ QMAKE_LINK_O_FLAG = --output=
+ QMAKE_LINK = $$SDK_ROOT/platform-tools/dx --dex
+} else {
+ QMAKE_LINK_O_FLAG = "cf "
+ QMAKE_LINK = jar
+}
+
+# Force link step to always happen, since we are always updating the
+# .class files
+PRE_TARGETDEPS += FORCE
diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
index 5eab94896b..eaa3108a8b 100644
--- a/mkspecs/features/mac/sdk.prf
+++ b/mkspecs/features/mac/sdk.prf
@@ -1,8 +1,53 @@
-!isEmpty(QMAKE_MAC_SDK) {
- !macx-xcode:!macx-pbuilder {
- QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK
- QMAKE_OBJECTIVE_CFLAGS += -isysroot $$QMAKE_MAC_SDK
- QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK
- QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK
- }
+
+isEmpty(QMAKE_MAC_SDK): \
+ error("QMAKE_MAC_SDK must be set when using CONFIG += sdk.")
+
+contains(QMAKE_MAC_SDK, .*/.*): \
+ error("QMAKE_MAC_SDK can only contain short-form SDK names (eg. macosx, iphoneos)")
+
+QMAKE_MAC_SDK_PATH = $$system("xcodebuild -sdk $$QMAKE_MAC_SDK -version Path 2>/dev/null")
+isEmpty(QMAKE_MAC_SDK_PATH): error("Could not resolve SDK path for \'$$QMAKE_MAC_SDK\'")
+
+!equals(MAKEFILE_GENERATOR, XCODE) {
+ QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH
+ QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH
+ QMAKE_OBJECTIVE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH
+ QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH
+}
+
+sysrootified =
+for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val
+QMAKE_INCDIR_OPENGL = $$sysrootified
+
+# Resolve SDK version of various tools
+for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB)) {
+ value = $$eval($$tool)
+ isEmpty(value): next()
+
+ sysrooted = $$system("xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value)")
+ $$tool = $$sysrooted $$member(value, 1, -1)
+}
+
+# We use xml as the output format instead of json since plutil on 10.6 does not have that option
+QMAKE_MAC_PLATFORM_NAME = $$system("plutil -convert xml1 \"$$QMAKE_MAC_SDK_PATH/SDKSettings.plist\" -o - | " \
+ "sed '/^<!DOCTYPE/d' | " \ # Don't look up http://www.apple.com/DTDs/PropertyList-1.0.dtd
+ "PERL5LIB= xpath 'string(//key[.=\"PLATFORM_NAME\"]/following-sibling::*[1])' 2>&1 | " \
+ "sed 's/.*Value: \\(.*\\)/\\1/'")
+
+isEmpty(QMAKE_MAC_PLATFORM_NAME): error("Could not resolve platform name for SDK '$$QMAKE_MAC_SDK'")
+
+!equals(MAKEFILE_GENERATOR, XCODE) {
+ # FIXME: Get the version_min_flag out of the platform's 'Native Build System.xcspec'
+ version_identifier = $$replace(QMAKE_MAC_PLATFORM_NAME, iphonesimulator, ios-simulator)
+
+ ios:!host_build: \
+ deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET
+ else: \
+ deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET
+
+ version_min_flag = -m$${version_identifier}-version-min=$$deployment_target
+ QMAKE_CFLAGS += $$version_min_flag
+ QMAKE_CXXFLAGS += $$version_min_flag
+ QMAKE_OBJECTIVE_CFLAGS += $$version_min_flag
+ QMAKE_LFLAGS += $$version_min_flag
}
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
index f9beabdc18..70c3bd6b66 100644
--- a/mkspecs/features/qml_plugin.prf
+++ b/mkspecs/features/qml_plugin.prf
@@ -18,12 +18,8 @@ if(win32|mac):!macx-xcode {
contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
contains(QT_CONFIG, build_all):CONFIG += build_all
}
-contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
-contains(QT_CONFIG, separate_debug_info):CONFIG += separate_debug_info
-contains(QT_CONFIG, separate_debug_info_nocopy):CONFIG += separate_debug_info_nocopy
-contains(QT_CONFIG, c++11):CONFIG += c++11
-isEmpty(CXX_MODULE) {
+!no_cxx_module:isEmpty(CXX_MODULE) {
CXX_MODULE = $$TARGET
TARGET = declarative_$${TARGET}
}
@@ -34,11 +30,13 @@ exists($$QMLTYPEFILE): QML_FILES += $$QMLTYPEFILE
# Install rules
+load(qt_build_paths)
+
qml1_target {
- DESTDIR = $$eval(QT.$${CXX_MODULE}.imports)/$$TARGETPATH
+ DESTDIR = $$MODULE_BASE_OUTDIR/imports/$$TARGETPATH
instbase = $$[QT_INSTALL_IMPORTS]
} else {
- DESTDIR = $$eval(QT.$${CXX_MODULE}.qml)/$$TARGETPATH
+ DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH
instbase = $$[QT_INSTALL_QML]
}
@@ -50,6 +48,7 @@ INSTALLS += target
TARGET = $$qtLibraryTarget($$TARGET)
load(qt_targets)
+load(qt_common)
# plugins.qmltypes is used by Qt Creator for syntax highlighting and the QML code model. It needs
# to be regenerated whenever the QML elements exported by the plugin change. This cannot be done
@@ -61,7 +60,14 @@ load(qt_targets)
#
!cross_compile {
build_pass|!debug_and_release {
- isEmpty(IMPORT_VERSION): IMPORT_VERSION = $$eval(QT.$${CXX_MODULE}.MAJOR_VERSION).$$eval(QT.$${CXX_MODULE}.MINOR_VERSION)
+ isEmpty(IMPORT_VERSION) {
+ no_cxx_module {
+ IMPORT_VERSION = $$replace(MODULE_VERSION, ^(\\d+\\.\\d+).*, \\1)
+ isEmpty(IMPORT_VERSION): error("Must set IMPORT_VERSION")
+ } else {
+ IMPORT_VERSION = $$eval(QT.$${CXX_MODULE}.MAJOR_VERSION).$$eval(QT.$${CXX_MODULE}.MINOR_VERSION)
+ }
+ }
load(resolve_target)
qml1_target: \
@@ -94,7 +100,7 @@ unix|win32-g++* {
!isEmpty(_QMAKE_SUPER_CACHE_): \
lib_replace.match = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]*/lib
else: \
- lib_replace.match = $$eval(QT.$${CXX_MODULE}.libs)
+ lib_replace.match = $$MODULE_BASE_OUTDIR
lib_replace.replace = $$[QT_INSTALL_LIBS/raw]
QMAKE_PRL_INSTALL_REPLACE += lib_replace
}
diff --git a/mkspecs/features/qmltestcase.prf b/mkspecs/features/qmltestcase.prf
index 71e70e06a4..335ba90009 100644
--- a/mkspecs/features/qmltestcase.prf
+++ b/mkspecs/features/qmltestcase.prf
@@ -2,7 +2,7 @@ CONFIG += testcase
QT += qml qmltest
-macx: CONFIG -= app_bundle
+mac: CONFIG -= app_bundle
# If the .pro file specified an IMPORTPATH, then add that to
# the command-line when the test is run.
diff --git a/mkspecs/features/qpa/basicunixfontdatabase.prf b/mkspecs/features/qpa/basicunixfontdatabase.prf
index 65490e03a8..261eadb5d0 100644
--- a/mkspecs/features/qpa/basicunixfontdatabase.prf
+++ b/mkspecs/features/qpa/basicunixfontdatabase.prf
@@ -1,5 +1,3 @@
-DEFINES += QT_COMPILES_IN_HARFBUZZ
-
contains(QT_CONFIG, system-freetype) {
LIBS += -lfreetype
}
diff --git a/mkspecs/features/qpa/genericunixfontdatabase.prf b/mkspecs/features/qpa/genericunixfontdatabase.prf
index 36a358271c..fc11bea470 100644
--- a/mkspecs/features/qpa/genericunixfontdatabase.prf
+++ b/mkspecs/features/qpa/genericunixfontdatabase.prf
@@ -2,7 +2,7 @@ CONFIG += qpa/basicunixfontdatabase
contains(QT_CONFIG, fontconfig) {
DEFINES += Q_FONTCONFIGDATABASE
LIBS += -lfontconfig
-} else {
+} else:!android {
fonts.path = $$[QT_INSTALL_LIBS]/fonts
fonts.files = $$QT_SOURCE_TREE/lib/fonts/*
INSTALLS += fonts
diff --git a/mkspecs/features/qt_android_deps.prf b/mkspecs/features/qt_android_deps.prf
new file mode 100644
index 0000000000..27814a90a5
--- /dev/null
+++ b/mkspecs/features/qt_android_deps.prf
@@ -0,0 +1,53 @@
+
+# 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.
+#
+
+# Generates an xml file to match the library in lib/ listing the dependencies
+# of the module on JNI-based libraries etc. Used for deployment of an Android
+# app.
+
+ANDROID_DEPENDS_DIR = $$MODULE_QMAKE_OUTDIR/lib/
+DEPENDENCY_FILE = $$ANDROID_DEPENDS_DIR$$TARGET-android-dependencies.xml
+
+!build_pass {
+ !isEmpty(ANDROID_JAR_DEPENDENCIES) {
+ for(JAR_FILE, ANDROID_JAR_DEPENDENCIES) {
+ INIT_CLASS = $$section(JAR_FILE, ":", 1, 1)
+ !isEmpty(INIT_CLASS): INIT_CLASS = "initClass=\"$$INIT_CLASS\""
+ JAR_FILE = $$section(JAR_FILE, ":", 0, 0)
+ FILE_CONTENT += "<jar file=\"$$JAR_FILE\" $$INIT_CLASS />"
+ }
+ }
+
+ !isEmpty(ANDROID_LIB_DEPENDENCIES) {
+ for(LIB_FILE, ANDROID_LIB_DEPENDENCIES) {
+ FILE_CONTENT += "<lib file=\"$$LIB_FILE\" />"
+ }
+ }
+
+ !isEmpty(ANDROID_LIB_DEPENDENCY_REPLACEMENTS) {
+ for(REPLACEMENT, ANDROID_LIB_DEPENDENCY_REPLACEMENTS) {
+ REPLACEMENT_FILE = $$section(REPLACEMENT, ":", 0, 0)
+ LIB_FILE = $$section(REPLACEMENT, ":", 1, 1)
+ FILE_CONTENT += "<lib file=\"$$LIB_FILE\" replaces=\"$$REPLACEMENT_FILE\" />"
+ }
+ }
+
+ !isEmpty(FILE_CONTENT) {
+ FILE_CONTENT = "<rules><dependencies><lib name=\"$$TARGET\"><depends>" $$FILE_CONTENT "</depends></lib></dependencies></rules>"
+ write_file($$DEPENDENCY_FILE, FILE_CONTENT) | error("Aborting.")
+ }
+}
+
+!isEmpty(ANDROID_JAR_DEPENDENCIES)|!isEmpty(ANDROID_LIB_DEPENDENCIES)|!isEmpty(ANDROID_LIB_DEPENDENCY_REPLACEMENTS) {
+ install_dependencies_file.files = $$DEPENDENCY_FILE
+ install_dependencies_file.path = $$[QT_INSTALL_LIBS]
+ INSTALLS += install_dependencies_file
+}
diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf
index 4f5b62e1e5..c53bc960a2 100644
--- a/mkspecs/features/qt_build_config.prf
+++ b/mkspecs/features/qt_build_config.prf
@@ -39,6 +39,9 @@ mac {
}
}
+cross_compile: \
+ CONFIG += force_bootstrap
+
CONFIG += \
create_prl link_prl \
prepare_docs qt_docs_targets \
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
new file mode 100644
index 0000000000..10b7736749
--- /dev/null
+++ b/mkspecs/features/qt_common.prf
@@ -0,0 +1,54 @@
+#
+# 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.
+#
+
+contains(QT_CONFIG, c++11): CONFIG += c++11
+contains(TEMPLATE, .*lib) {
+ # module and plugins
+ contains(QT_CONFIG, reduce_exports): CONFIG += hide_symbols
+ unix:contains(QT_CONFIG, reduce_relocations): CONFIG += bsymbolic_functions
+ contains(QT_CONFIG, largefile): CONFIG += largefile
+ contains(QT_CONFIG, separate_debug_info): CONFIG += separate_debug_info
+ contains(QT_CONFIG, separate_debug_info_nocopy): CONFIG += separate_debug_info_nocopy
+}
+
+warnings_are_errors:warning_clean {
+ # If the module declares that it has does its clean-up of warnings, enable -Werror.
+ # This setting is compiler-dependent anyway because it depends on the version of the
+ # compiler.
+ clang {
+ # Apple clang 4.0+ or clang 3.1+
+ greaterThan(QT_CLANG_MAJOR_VERSION, 3) | \
+ if(equals(QT_CLANG_MAJOR_VERSION, 3):greaterThan(QT_CLANG_MINOR_VERSION, 1)) | \
+ greaterThan(QT_APPLE_CLANG_MAJOR_VERSION, 3) {
+ QMAKE_CXXFLAGS += -Werror -Wno-error=\\$${LITERAL_HASH}warnings $$WERROR
+ }
+ } else:intel_icc {
+ # Intel CC 13.0+ (a.k.a. Intel Composer XE 2013)
+ greaterThan(QT_ICC_MAJOR_VERSION, 12) {
+ # 177: function "entity" was declared but never referenced
+ # (too aggressive; ICC reports even for functions created due to template instantiation)
+ # 1224: #warning directive
+ # 1881: argument must be a constant null pointer value
+ # (NULL in C++ is usually a literal 0)
+ QMAKE_CXXFLAGS += -Werror -ww177,1224,1881 $$WERROR
+ }
+ } else:gcc {
+ # GCC 4.6+
+ # note: there was no GCC 3.6 and this assumes no one is crazy enough to compile Qt with GCC 2.7
+ greaterThan(QT_GCC_MAJOR_VERSION, 4)|greaterThan(QT_GCC_MINOR_VERSION, 5) {
+ QMAKE_CXXFLAGS += -Werror -Wno-error=cpp $$WERROR
+
+ # GCC prints this bogus warning, after it has inlined a lot of code
+ # error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
+ QMAKE_CXXFLAGS += -Wno-error=strict-overflow
+ }
+ }
+}
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index d015b213d7..ba109864f6 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -27,6 +27,17 @@ isEmpty(VERSION): error("Module does not define version.")
# unless overridden. Host builds are always static
host_build|staticlib: CONFIG += static
+host_build {
+ QT -= gui # no host module will ever use gui
+ force_bootstrap {
+ !build_pass: CONFIG += release
+ contains(QT, core(-private)?|xml) {
+ QT -= core core-private xml
+ QT += bootstrap-private
+ }
+ }
+}
+
ucmodule = $$upper($$MODULE)
isEmpty(MODULE_INCNAME): MODULE_INCNAME = $$TARGET
@@ -74,13 +85,6 @@ contains(TARGET, QtAddOn.*): \
else: \
DEFINES += QT_BUILD_$${ucmodule}_LIB
-contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
-unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
-contains(QT_CONFIG, largefile):CONFIG += largefile
-contains(QT_CONFIG, separate_debug_info):CONFIG += separate_debug_info
-contains(QT_CONFIG, separate_debug_info_nocopy):CONFIG += separate_debug_info_nocopy
-contains(QT_CONFIG, c++11):CONFIG += c++11
-
#mac frameworks
mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) {
#QMAKE_FRAMEWORK_VERSION = 4.0
@@ -115,6 +119,8 @@ aix-g++* {
QMAKE_CXXFLAGS += -mminimal-toc
}
+android: CONFIG += qt_android_deps
+
#install directives
load(qt_installs)
@@ -169,6 +175,7 @@ win32 {
TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end
load(qt_targets)
+load(qt_common)
win32:DEFINES+=_USE_MATH_DEFINES
diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf
index 10d3fe3c0b..1ddc28bed0 100644
--- a/mkspecs/features/qt_module_headers.prf
+++ b/mkspecs/features/qt_module_headers.prf
@@ -13,13 +13,22 @@ load(qt_build_paths)
!build_pass {
qtPrepareTool(QMAKE_SYNCQT, syncqt)
- contains(QT_CONFIG, private_tests): \ # -developer-build
- QMAKE_SYNCQT += -check-includes
- QMAKE_SYNCQT += -module $$MODULE_INCNAME -mkspecsdir $$[QT_HOST_DATA/get]/mkspecs -outdir $$MODULE_BASE_OUTDIR $$MODULE_BASE_DIR
+ minimal_syncqt {
+ QMAKE_SYNCQT += -minimal $$QMAKE_SYNCQT_OPTIONS
+ } else {
+ contains(QT_CONFIG, private_tests): \ # -developer-build
+ QMAKE_SYNCQT += -check-includes
+ QMAKE_SYNCQT += -module $$MODULE_INCNAME
+ }
+ QMAKE_SYNCQT += \
+ -mkspecsdir $$[QT_HOST_DATA/get]/mkspecs \
+ -outdir $$MODULE_BASE_OUTDIR $$MODULE_BASE_DIR
!silent: message($$QMAKE_SYNCQT)
system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT")
}
+minimal_syncqt: return()
+
#load up the headers info
include($$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/headers.pri, "", true)
diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf
index b74e5dd73f..2822e70b05 100644
--- a/mkspecs/features/qt_module_pris.prf
+++ b/mkspecs/features/qt_module_pris.prf
@@ -43,7 +43,7 @@ else: \
module_config = "QT.$${MODULE}.CONFIG = $$MODULE_CONFIG"
else: \
module_config =
- !no_module_headers {
+ !no_module_headers:!minimal_syncqt {
MODULE_INCLUDES = "\$\$QT_MODULE_INCLUDE_BASE \$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME"
MODULE_PRIVATE_INCLUDES = "\$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION \
\$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME"
diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
index 54a995daae..98710431c3 100644
--- a/mkspecs/features/qt_plugin.prf
+++ b/mkspecs/features/qt_plugin.prf
@@ -23,10 +23,6 @@ tool_plugin {
contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
contains(QT_CONFIG, build_all):CONFIG += build_all
}
-contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
-contains(QT_CONFIG, separate_debug_info):CONFIG += separate_debug_info
-contains(QT_CONFIG, separate_debug_info_nocopy):CONFIG += separate_debug_info_nocopy
-contains(QT_CONFIG, c++11):CONFIG += c++11
CONFIG(static, static|shared) {
isEmpty(MODULE): MODULE = $$basename(TARGET)
@@ -52,6 +48,7 @@ INSTALLS += target
TARGET = $$qtLibraryTarget($$TARGET)
load(qt_targets)
+load(qt_common)
wince*:LIBS += $$QMAKE_LIBS_GUI
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
index b449e4074d..56ba1169a1 100644
--- a/mkspecs/features/qt_tool.prf
+++ b/mkspecs/features/qt_tool.prf
@@ -17,9 +17,13 @@ DESTDIR = $$MODULE_BASE_OUTDIR/bin
CONFIG += console
isEmpty(QMAKE_INFO_PLIST): CONFIG -= app_bundle
-host_build {
+host_build: QT -= gui # no host tool will ever use gui
+host_build:force_bootstrap {
!build_pass: CONFIG += release
- QT = bootstrap-private
+ contains(QT, core(-private)?|xml) {
+ QT -= core core-private xml
+ QT += bootstrap-private
+ }
target.path = $$[QT_HOST_BINS]
} else {
!build_pass:contains(QT_CONFIG, build_all): CONFIG += release
@@ -28,10 +32,12 @@ host_build {
INSTALLS += target
load(qt_targets)
+load(qt_common)
# If we are doing a prefix build, create a "module" pri which enables
# qtPrepareTool() to work with the non-installed build.
-!build_pass:prefix_build {
+# Non-bootstrapped tools always need this because of the environment setup.
+!build_pass:if(!host_build|!force_bootstrap|prefix_build) {
isEmpty(MODULE):MODULE = $$TARGET
@@ -41,7 +47,7 @@ load(qt_targets)
load(resolve_target)
cmd = $$shell_path($$QMAKE_RESOLVED_TARGET)
- !host_build: qtAddTargetEnv(cmd)
+ !host_build|!force_bootstrap: qtAddTargetEnv(cmd)
TOOL_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_tool_$${MODULE}.pri
diff --git a/mkspecs/features/resolve_target.prf b/mkspecs/features/resolve_target.prf
index 8cd12b2a00..22d7722ce3 100644
--- a/mkspecs/features/resolve_target.prf
+++ b/mkspecs/features/resolve_target.prf
@@ -28,7 +28,7 @@ win32 {
} else {
contains(TEMPLATE, .*lib):LIBPREFIX = lib
- macx {
+ mac {
equals(TEMPLATE, lib) {
lib_bundle {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET}.framework/$${TARGET}
diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf
index faf4eeb124..15febe2dd5 100644
--- a/mkspecs/features/testcase.prf
+++ b/mkspecs/features/testcase.prf
@@ -32,7 +32,7 @@ contains(MUNGED_TARGET,.*/.*):check.commands = cd $(DESTDIR) &&
# Allow for a custom test runner script
check.commands += $(TESTRUNNER)
-macx {
+mac {
app_bundle: check.commands += ./$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET)
else: check.commands += ./$(QMAKE_TARGET)
}
diff --git a/mkspecs/features/unix/opengl.prf b/mkspecs/features/unix/opengl.prf
index 74a514915d..8dd47d089d 100644
--- a/mkspecs/features/unix/opengl.prf
+++ b/mkspecs/features/unix/opengl.prf
@@ -11,7 +11,7 @@ contains(QT_CONFIG, opengles1) {
} else {
INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
!isEmpty(QMAKE_LIBDIR_OPENGL):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL
- target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_QT
+ target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL
else:LIBS += $$QMAKE_LIBS_OPENGL
}
diff --git a/mkspecs/features/unix/separate_debug_info.prf b/mkspecs/features/unix/separate_debug_info.prf
index cea1731888..c5ff6dcba3 100644
--- a/mkspecs/features/unix/separate_debug_info.prf
+++ b/mkspecs/features/unix/separate_debug_info.prf
@@ -1,8 +1,15 @@
!separate_debug_info_nocopy:have_target:!static:!isEmpty(QMAKE_OBJCOPY) {
- qnx:debug_info_suffix=sym
- else:debug_info_suffix=debug
- QMAKE_SEPARATE_DEBUG_INFO = test -z \"$(DESTDIR)\" || cd \"$(DESTDIR)\" ; targ=`basename $(TARGET)`; $$QMAKE_OBJCOPY --only-keep-debug \"\$\$targ\" \"\$\$targ.$$debug_info_suffix\" && $$QMAKE_OBJCOPY --strip-debug \"\$\$targ\" && $$QMAKE_OBJCOPY --add-gnu-debuglink=\"\$\$targ.$$debug_info_suffix\" \"\$\$targ\" && chmod -x \"\$\$targ.$$debug_info_suffix\"
+ qnx {
+ debug_info_suffix = sym
+ debug_info_keep = --keep-file-symbols
+ debug_info_strip = --strip-debug -R.ident
+ } else {
+ debug_info_suffix = debug
+ debug_info_keep = --only-keep-debug
+ debug_info_strip = --strip-debug
+ }
+ QMAKE_SEPARATE_DEBUG_INFO = test -z \"$(DESTDIR)\" || cd \"$(DESTDIR)\" ; targ=`basename $(TARGET)`; $$QMAKE_OBJCOPY $$debug_info_keep \"\$\$targ\" \"\$\$targ.$$debug_info_suffix\" && $$QMAKE_OBJCOPY $$debug_info_strip \"\$\$targ\" && $$QMAKE_OBJCOPY --add-gnu-debuglink=\"\$\$targ.$$debug_info_suffix\" \"\$\$targ\" && chmod -x \"\$\$targ.$$debug_info_suffix\"
QMAKE_INSTALL_SEPARATE_DEBUG_INFO = test -z \"$(DESTDIR)\" || cd \"$(DESTDIR)\" ; $(INSTALL_FILE) `basename $(TARGET)`.$$debug_info_suffix $(INSTALL_ROOT)/\$\$target_path/
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK
diff --git a/mkspecs/features/win32/opengl.prf b/mkspecs/features/win32/opengl.prf
index 898dee77f9..0f33f31e59 100644
--- a/mkspecs/features/win32/opengl.prf
+++ b/mkspecs/features/win32/opengl.prf
@@ -21,6 +21,7 @@ wince* {
QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_RELEASE
}
DEFINES += QT_OPENGL_ES_2 QT_OPENGL_ES_2_ANGLE
+ contains(QT_CONFIG, static): DEFINES += QT_OPENGL_ES_2_ANGLE_STATIC
QT_CONFIG -= opengl
} else {
QMAKE_LIBS += $$QMAKE_LIBS_OPENGL