summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/configure.prf3
-rw-r--r--mkspecs/features/create_cmake.prf54
-rw-r--r--mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in22
-rw-r--r--mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in11
-rw-r--r--mkspecs/features/gcov.prf31
-rw-r--r--mkspecs/features/ios/default_post.prf95
-rw-r--r--mkspecs/features/ios/default_pre.prf2
-rw-r--r--mkspecs/features/ios/qt.prf76
-rw-r--r--mkspecs/features/java.prf9
-rw-r--r--mkspecs/features/qt_common.prf31
-rw-r--r--mkspecs/features/qt_docs.prf2
-rw-r--r--mkspecs/features/qt_functions.prf9
-rw-r--r--mkspecs/features/qt_module.prf1
-rw-r--r--mkspecs/features/qt_plugin.prf2
-rw-r--r--mkspecs/features/simd.prf3
-rw-r--r--mkspecs/features/spec_post.prf10
16 files changed, 280 insertions, 81 deletions
diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
index b4569df6d5..39144e7216 100644
--- a/mkspecs/features/configure.prf
+++ b/mkspecs/features/configure.prf
@@ -7,9 +7,6 @@ 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 6b0f98711e..5bc7cc81b1 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -62,6 +62,12 @@ contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
CMAKE_BIN_DIR_IS_ABSOLUTE = True
}
+CMAKE_PLUGIN_DIR = $$cmakeRelativePath($$[QT_INSTALL_PLUGINS], $$[QT_INSTALL_PREFIX])
+contains(CMAKE_PLUGIN_DIR, "^\\.\\./.*") {
+ CMAKE_PLUGIN_DIR = $$[QT_INSTALL_PLUGINS]/
+ CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True
+}
+
!isEmpty(DLLDESTDIR):!static:!staticlib {
CMAKE_DLL_DIR = $$cmakeRelativePath($$[QT_INSTALL_BINS], $$[QT_INSTALL_PREFIX])
contains(CMAKE_DLL_DIR, "^\\.\\./.*") {
@@ -73,12 +79,6 @@ contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE
}
-CMAKE_HOST_DATA_DIR = $$cmakeRelativePath($$[QT_HOST_DATA], $$[QT_INSTALL_PREFIX])
-contains(CMAKE_HOST_DATA_DIR, "^\\.\\./.*") {
- CMAKE_HOST_DATA_DIR = $$[QT_HOST_DATA]/
- CMAKE_HOST_DATA_DIR_IS_ABSOLUTE = True
-}
-
static|staticlib:CMAKE_STATIC_TYPE = true
CMAKE_DEBUG_TYPE =
@@ -102,6 +102,48 @@ equals(QMAKE_HOST.os, Windows): CMAKE_BIN_SUFFIX = ".exe"
if(build_all|CONFIG(debug, debug|release)): CMAKE_DEBUG_TYPE = debug
if(build_all|CONFIG(release, debug|release)): CMAKE_RELEASE_TYPE = release
+contains(CONFIG, plugin) {
+ equals(PLUGIN_TYPE, bearer): PLUGIN_MODULE_NAME = network
+ else:equals(PLUGIN_TYPE, sqldrivers): PLUGIN_MODULE_NAME = sql
+ else:equals(PLUGIN_TYPE, accessible): PLUGIN_MODULE_NAME = widgets
+ else:equals(PLUGIN_TYPE, imageformats): PLUGIN_MODULE_NAME = gui
+ else:equals(PLUGIN_TYPE, platforminputcontexts): PLUGIN_MODULE_NAME = gui
+ else:equals(PLUGIN_TYPE, platformthemes): PLUGIN_MODULE_NAME = gui
+ else:equals(PLUGIN_TYPE, generic): PLUGIN_MODULE_NAME = gui
+ else:equals(PLUGIN_TYPE, platforms): PLUGIN_MODULE_NAME = gui
+ else: return()
+
+ CMAKE_MODULE_NAME = $$cmakeModuleName($$PLUGIN_MODULE_NAME)
+
+ CMAKE_PLUGIN_NAME = $$PLUGIN_CLASS_NAME
+
+ win32 {
+ CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.dll
+ CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.dll
+ } else {
+ mac {
+ CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}.dylib
+ CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}.dylib
+ } else {
+ CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}.so
+ CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}.so
+ }
+ }
+ cmake_target_file.input = $$PWD/data/cmake/Qt5PluginTarget.cmake.in
+ cmake_target_file.output = $$DESTDIR/../../$${CMAKE_LIB_DIR}cmake/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}.cmake
+
+ !build_pass:QMAKE_SUBSTITUTES += \
+ cmake_target_file
+
+ cmake_qt5_plugin_file.files = $$cmake_target_file.output
+ cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
+ INSTALLS += cmake_qt5_plugin_file
+
+ return()
+}
+
+contains($$list(network sql widgets gui), $$MODULE): CMAKE_LOAD_PLUGINS = true
+
unix:contains(QT_CONFIG, reduce_relocations):CMAKE_ADD_FPIE_FLAGS = "true"
CMAKE_MKSPEC = $$[QMAKE_XSPEC]
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index 657c7c642d..245c0ae768 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -288,6 +288,28 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ENDIF // CMAKE_DEBUG_TYPE
+!!IF !isEmpty(CMAKE_LOAD_PLUGINS)
+
+ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
+ set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
+
+!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
+ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
+!!ELSE
+ set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
+!!ENDIF
+ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
+ set_target_properties(Qt5::${Plugin} PROPERTIES
+ \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
+ )
+ endmacro()
+
+ file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\")
+ foreach(pluginTarget ${pluginTargets})
+ include(${pluginTarget})
+ endforeach()
+!!ENDIF
+
!!IF !isEmpty(CMAKE_MODULE_EXTRAS)
include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\")
!!ENDIF
diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
new file mode 100644
index 0000000000..5baf0fdb10
--- /dev/null
+++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
@@ -0,0 +1,11 @@
+
+add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
+
+!!IF !isEmpty(CMAKE_RELEASE_TYPE)
+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
+!!ENDIF
+!!IF !isEmpty(CMAKE_DEBUG_TYPE)
+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
+!!ENDIF
+
+list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)
diff --git a/mkspecs/features/gcov.prf b/mkspecs/features/gcov.prf
new file mode 100644
index 0000000000..330831fc0e
--- /dev/null
+++ b/mkspecs/features/gcov.prf
@@ -0,0 +1,31 @@
+#
+# Tested with gcov 4.8.1
+# http://gcc.gnu.org/onlinedocs/gcc-4.8.1/gcc/Gcov.html
+
+# To instrument a Qt application or library with the gcov coverage
+# tool, do `CONFIG+=gcov' in the application .pro file.
+#
+# To instrument Qt itself with gcov, use the `-gcov' configure
+# option.
+
+# The .gcno file is generated when the source file is compiled.
+# The .gcda file is generated when a program is executed.
+
+# Example how to generate the html output after you've run the program or test
+#
+# lcov --capture --directory . --output-file coverage-gcov.info --no-external
+# lcov --output-file coverage-gcov.info --remove coverage-gcov.info '*.moc*' '.*rcc*' '*3rdparty*'
+# genhtml coverage-gcov.info --output-directory doc/coverage
+
+# If you want to use gcov directly, you most likely need to manually move the .gcda and .gcno files
+# along with the program.
+#
+# mv .obj/debug-shared/tst_example.gc* .
+# gcov -b -c tst_example.cpp
+
+QMAKE_CFLAGS += -fprofile-arcs -ftest-coverage
+QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
+QMAKE_OBJECTIVE_CFLAGS += -fprofile-arcs -ftest-coverage
+QMAKE_LFLAGS += -fprofile-arcs -ftest-coverage
+
+QMAKE_CLEAN += $(OBJECTS_DIR)*.gcno and $(OBJECTS_DIR)*.gcda
diff --git a/mkspecs/features/ios/default_post.prf b/mkspecs/features/ios/default_post.prf
index e9d2149351..654255eb1f 100644
--- a/mkspecs/features/ios/default_post.prf
+++ b/mkspecs/features/ios/default_post.prf
@@ -1,40 +1,44 @@
-CONFIG(qt):contains(QT, gui):equals(TEMPLATE, app): CONFIG += gui_app
+equals(TEMPLATE, app) {
+ qt:app_bundle:!macx-xcode {
+ # For Qt applications we want Xcode project files as the generated output,
+ # but since qmake doesn't handle the transition between makefiles and Xcode
+ # project files (which happens when using subdirs), we create a wrapper
+ # makefile that takes care of generating the Xcode project, and allows
+ # building by calling out to xcodebuild.
+ TEMPLATE = aux
-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
-}
+ CONFIG -= have_target qt staticlib dll
+ SOURCES =
+ RESOURCES =
+ INSTALLS =
+
+ TARGET_XCODE_PROJECT_DIR = $${TARGET}.xcodeproj
+
+ system("cd $$system_quote($$OUT_PWD) && $${QMAKE_QMAKE} $$system_quote($$_PRO_FILE_) -spec macx-xcode")
-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)
+ # We use xcodebuild to do the actual build, but filter out the verbose
+ # output that shows all environment variables for each build step.
+ xcodebuild_build.commands = "@xcodebuild build | grep -v setenv"
+ QMAKE_EXTRA_TARGETS += xcodebuild_build
+ all.depends = xcodebuild_build
+ QMAKE_EXTRA_TARGETS += all
- # Which means we don't want the auto-generated import for the platform plugin
- CONFIG -= import_qpa_plugin
+ # We do the same for the clean action
+ xcodebuild_clean.commands = "@xcodebuild clean"
+ QMAKE_EXTRA_TARGETS += xcodebuild_clean
+ clean.depends = xcodebuild_clean
+ QMAKE_EXTRA_TARGETS += clean
- !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
+ # And distclean
+ xcodebuild_distclean.commands = "$(DEL_FILE) -R $$TARGET_XCODE_PROJECT_DIR"
+ QMAKE_EXTRA_TARGETS += xcodebuild_distclean
+ distclean.depends = xcodebuild_distclean
+ QMAKE_EXTRA_TARGETS += distclean
}
}
-contains(MAKEFILE_GENERATOR, XCODE) {
+macx-xcode {
ios_device_family.name = TARGETED_DEVICE_FAMILY
ios_device_family.value = $$QMAKE_IOS_TARGETED_DEVICE_FAMILY
QMAKE_MAC_XCODE_SETTINGS += ios_device_family
@@ -46,24 +50,27 @@ isEmpty(QT_ARCH) {
# 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
+ contains(QMAKE_MAC_SDK, iphoneos.*): QT_ARCH = arm
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
+# Be more specific about which architecture we're targeting
+equals(QT_ARCH, arm): \
+ actual_archs = armv7
+else: \
+ actual_archs = $$QT_ARCH
+
+macx-xcode {
+ QMAKE_XCODE_ARCHS = $$actual_archs
+} else {
+ for(arch, actual_archs): \
+ arch_flags += -arch $$arch
+
+ QMAKE_CFLAGS += $$arch_flags
+ QMAKE_CXXFLAGS += $$arch_flags
+ QMAKE_OBJECTIVE_CFLAGS += $$arch_flags
+ QMAKE_LFLAGS += $$arch_flags
}
+unset(actual_archs)
load(default_post)
diff --git a/mkspecs/features/ios/default_pre.prf b/mkspecs/features/ios/default_pre.prf
index 7cfbc03eb5..5db8d98d6c 100644
--- a/mkspecs/features/ios/default_pre.prf
+++ b/mkspecs/features/ios/default_pre.prf
@@ -1,5 +1,3 @@
-# Unset makefile generator, so we can auto-detect value in default_post
-!macx-xcode: unset(MAKEFILE_GENERATOR)
load(default_pre)
diff --git a/mkspecs/features/ios/qt.prf b/mkspecs/features/ios/qt.prf
new file mode 100644
index 0000000000..f89cb0c287
--- /dev/null
+++ b/mkspecs/features/ios/qt.prf
@@ -0,0 +1,76 @@
+
+equals(TEMPLATE, app):contains(QT, gui(-private)?) {
+ LIBS *= -L$$[QT_INSTALL_PLUGINS/get]/platforms
+
+ lib_name = qios
+ lib_path_and_base = $$[QT_INSTALL_PLUGINS/get]/platforms/lib$${lib_name}$$qtPlatformTargetSuffix()
+ LIBS += -l$${lib_name}$$qtPlatformTargetSuffix() $$fromfile($${lib_path_and_base}.prl, QMAKE_PRL_LIBS)
+
+ # By marking qt_registerPlatformPlugin as undefined, we ensure that
+ # the plugin.o translation unit is considered for inclusion in
+ # the final binary, which in turn ensures that the plugin's
+ # static initializer is included and run.
+ QMAKE_LFLAGS += -u _qt_registerPlatformPlugin
+
+ # We do link and dependency resolution for the platform plugin
+ # manually, since we know we always need the plugin, so we don't
+ # need to generate an import for it.
+ CONFIG -= import_qpa_plugin
+
+ !no_main_wrapper {
+ # Instead of messing with the user's main function we go the other
+ # way and change the application entry point to call our main wrapper.
+ # This entry point is the 'start' symbol, provided by crt1.o, so we
+ # make a copy of the file and rename the '_main' unresolved symbol
+ # to our wrapper function, '_qtmn', injecting ourselves into the app
+ # startup. Once Apple starts shipping the LLVM linker (lld) we may
+ # get rid of this step completely and just pass -e _qtmn to the
+ # linker, taking advantage of the new LC_MAIN load command.
+
+ # We use xcodebuild to resolve the location of the crt1 object file
+ # as we know that it lives in the same location as the c library.
+ c_library_path = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -find-library c 2>/dev/null")
+
+ # We also know that iOS 3.1 and up uses crt1.3.1.o (technically not
+ # true for simulator, but the SDK has a symlink to the correct file).
+ original_crt_path = $$dirname(c_library_path)/crt1.3.1.o
+
+ xcode_objects_path = "$(OBJECT_FILE_DIR_$(CURRENT_VARIANT))/$(CURRENT_ARCH)"
+ custom_crt_filename = "crt1_qt.o"
+ custom_crt_path = "$$xcode_objects_path/$$custom_crt_filename"
+
+ EOC = $$escape_expand(\\n\\t)
+ create_custom_crt.commands = \
+ # Copy original crt1 to build directory
+ "$$QMAKE_COPY_FILE $$original_crt_path $$custom_crt_path $$EOC" \
+ # And rename all occurrences of _main to _qtmn
+ "strings -t d - $${custom_crt_path}" \
+ "| sed -n 's/^\\([0-9]\\{1,\\}\\) _main\$\$/\1/p'" \
+ "| while read offset; do" \
+ "printf '_qtmn'" \
+ "| dd of=$${custom_crt_path} bs=1 seek=\$\$offset conv=notrunc >/dev/null 2>&1" \
+ "; done"
+ create_custom_crt.depends = $$original_crt_path
+ create_custom_crt.target = $$custom_crt_path
+ preprocess.depends = create_custom_crt
+ QMAKE_EXTRA_TARGETS += create_custom_crt preprocess
+
+ clean_custom_crt.commands = "$$QMAKE_DEL_FILE $$custom_crt_path"
+ preprocess_clean.depends += clean_custom_crt
+ QMAKE_EXTRA_TARGETS += clean_custom_crt preprocess_clean
+
+ # Prevent usage of new LC_MAIN load command, which skips start/crt1
+ # and calls main from the loader. We rely on injecting into start.
+ QMAKE_LFLAGS += -Wl,-no_new_main
+
+ # Explicitly link against our modified crt1 object
+ QMAKE_LFLAGS += -nostartfiles -l$${custom_crt_filename}
+
+ # Workaround for QMAKE_PBX_LIBPATHS mangling the Xcode variables
+ lib_search_path.name = LIBRARY_SEARCH_PATHS
+ lib_search_path.value = $$xcode_objects_path
+ QMAKE_MAC_XCODE_SETTINGS += lib_search_path
+ }
+}
+
+load(qt)
diff --git a/mkspecs/features/java.prf b/mkspecs/features/java.prf
index d8ceb536a7..7815b5ef38 100644
--- a/mkspecs/features/java.prf
+++ b/mkspecs/features/java.prf
@@ -12,10 +12,11 @@ android {
isEmpty(BUILD_TOOLS_REVISION): BUILD_TOOLS_REVISION = 17.0.0
}
- !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.")
+ ANDROID_JAR_FILE = $$SDK_ROOT/platforms/$$API_VERSION/android.jar
+ !exists($$ANDROID_JAR_FILE) {
+ error("The Path $$ANDROID_JAR_FILE 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
+ JAVACLASSPATH += $$ANDROID_JAR_FILE
# 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.
@@ -37,7 +38,7 @@ 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($$shell_path($$join(JAVACLASSPATH, $$QMAKE_DIRLIST_SEP))) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN}
+javac.commands = javac -source 6 -target 6 -Xlint:unchecked -bootclasspath $$ANDROID_JAR_FILE -cp $$shell_quote($$shell_path($$join(JAVACLASSPATH, $$QMAKE_DIRLIST_SEP))) -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
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
index 10b7736749..da4e27de38 100644
--- a/mkspecs/features/qt_common.prf
+++ b/mkspecs/features/qt_common.prf
@@ -24,31 +24,34 @@ warnings_are_errors:warning_clean {
# 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
+ # Apple clang 4.0-4.2
+ # Regular clang is not tested
+ ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION}
+ contains(ver, "4\\.[012]") {
+ QMAKE_CXXFLAGS += -Werror -Wno-error=\\$${LITERAL_HASH}warnings -Wno-error=deprecated-declarations $$WERROR
}
- } else:intel_icc {
- # Intel CC 13.0+ (a.k.a. Intel Composer XE 2013)
- greaterThan(QT_ICC_MAJOR_VERSION, 12) {
+ } else:intel_icc:linux {
+ # Intel CC 13.0 - 14.0, on Linux only
+ ver = $${QT_ICC_MAJOR_VERSION}.$${QT_ICC_MINOR_VERSION}
+ linux:contains(ver, "(13\\.|14\\.0)") {
# 177: function "entity" was declared but never referenced
# (too aggressive; ICC reports even for functions created due to template instantiation)
# 1224: #warning directive
+ # 1478: function "entity" (declared at line N) was declared deprecated
# 1881: argument must be a constant null pointer value
# (NULL in C++ is usually a literal 0)
- QMAKE_CXXFLAGS += -Werror -ww177,1224,1881 $$WERROR
+ QMAKE_CXXFLAGS += -Werror -ww177,1224,1478,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
+ } else:gcc:!clang:!intel_icc {
+ # GCC 4.6-4.8
+ ver = $${QT_GCC_MAJOR_VERSION}.$${QT_GCC_MINOR_VERSION}
+ contains(ver, "4\\.[678]") {
+ QMAKE_CXXFLAGS += -Werror -Wno-error=cpp -Wno-error=deprecated-declarations $$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
}
}
+ unset(ver)
}
diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf
index 85e2db25bc..be3cd5273c 100644
--- a/mkspecs/features/qt_docs.prf
+++ b/mkspecs/features/qt_docs.prf
@@ -34,7 +34,7 @@ qtmver.value = $$replace(qtver.value, ^(\\d+\\.\\d+).*$, \\1)
qtvertag.name = QT_VERSION_TAG
qtvertag.value = $$replace(qtver.value, \.,)
qtdocs.name = QT_INSTALL_DOCS
-qtdocs.value = $$[QT_INSTALL_DOCS/get]
+qtdocs.value = $$[QT_INSTALL_DOCS/src]
qtAddToolEnv(QDOC, qtver qtmver qtvertag qtdocs)
doc_command = $$QDOC $$QMAKE_DOCS
prepare_docs {
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 31b7607d6e..7bedf6f760 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -71,11 +71,6 @@ defineTest(qtAddModule) {
MODULE_LIBS_ADD = $$MODULE_LIBS
MODULE_LIBS_ADD -= $$QMAKE_DEFAULT_LIBDIRS
- INCLUDEPATH *= $$MODULE_INCLUDES
- auto_use_privates|isEqual(2, UsePrivate) { # Tests function parameter 2 ($$2) being equal to 'UsePrivate'
- INCLUDEPATH += $$eval(QT.$${1}.private_includes)
- }
-
unset(LINKAGE)
mac:contains(MODULE_CONFIG, lib_bundle) {
FRAMEWORK_INCLUDE = $${MODULE_LIBS}/$${MODULE_NAME}.framework/Headers
@@ -88,6 +83,10 @@ defineTest(qtAddModule) {
$$FRAMEWORK_INCLUDE/$$eval(QT.$${1}.VERSION)/$$MODULE_NAME
QMAKE_FRAMEWORKPATH *= $${MODULE_LIBS}
LINKAGE += -framework $${MODULE_NAME}$${QT_LIBINFIX}
+ } else {
+ INCLUDEPATH *= $$MODULE_INCLUDES
+ auto_use_privates|isEqual(2, UsePrivate): \
+ INCLUDEPATH += $$eval(QT.$${1}.private_includes)
}
# Re-insert the major version in the library name (cf qtLibraryTarget above)
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index 390fb49930..b614112fd7 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -91,6 +91,7 @@ else: \
mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) {
#QMAKE_FRAMEWORK_VERSION = 4.0
CONFIG += lib_bundle sliced_bundle qt_framework
+ CONFIG -= qt_install_headers #no need to install these as well
!debug_and_release|if(build_all:CONFIG(release, debug|release)) {
FRAMEWORK_HEADERS.version = Versions
FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
index 9f4882c5db..c9fe22688b 100644
--- a/mkspecs/features/qt_plugin.prf
+++ b/mkspecs/features/qt_plugin.prf
@@ -47,6 +47,8 @@ INSTALLS += target
TARGET = $$qtLibraryTarget($$TARGET)
+CONFIG += create_cmake
+
load(qt_targets)
load(qt_common)
diff --git a/mkspecs/features/simd.prf b/mkspecs/features/simd.prf
index 14da926dc3..e0cd5a3a58 100644
--- a/mkspecs/features/simd.prf
+++ b/mkspecs/features/simd.prf
@@ -12,6 +12,9 @@
# Get the SIMD flags
load(qt_build_config)
+# Set QT_CPU_FEATURES for convenience
+QT_CPU_FEATURES = $$eval(QT_CPU_FEATURES.$$QT_ARCH)
+
#
# Set up compilers for SIMD (SSE/AVX, NEON etc)
#
diff --git a/mkspecs/features/spec_post.prf b/mkspecs/features/spec_post.prf
index c9e9f8b2f6..ad03c9c428 100644
--- a/mkspecs/features/spec_post.prf
+++ b/mkspecs/features/spec_post.prf
@@ -9,7 +9,7 @@ isEmpty(QMAKE_PLATFORM) {
isEmpty(TARGET_PLATFORM) {
equals(MAKEFILE_GENERATOR, UNIX) {
equals(QMAKE_HOST.os, Darwin): \
- TARGET_PLATFORM = macx
+ TARGET_PLATFORM = macx # backwards compatibility; cannot change
else: \
TARGET_PLATFORM = unix
} else:if(equals(MAKEFILE_GENERATOR, MSVC.NET) \
@@ -28,12 +28,18 @@ isEmpty(QMAKE_PLATFORM) {
equals(TARGET_PLATFORM, unix): \
QMAKE_PLATFORM = unix
else:equals(TARGET_PLATFORM, macx): \
- QMAKE_PLATFORM = mac macx unix
+ QMAKE_PLATFORM = osx macx mac darwin unix
else:equals(TARGET_PLATFORM, win32): \
QMAKE_PLATFORM = win32
else: \
error("Qmake spec sets an invalid TARGET_PLATFORM.")
}
+
+contains(QMAKE_PLATFORM, macx):!contains(QMAKE_PLATFORM, osx) {
+ warning("qmake spec specifies platform macx, but not osx.")
+ QMAKE_PLATFORM = osx $$QMAKE_PLATFORM
+}
+
CONFIG += $$QMAKE_PLATFORM
isEmpty(QMAKE_COMPILER) {