summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-04-29 14:17:08 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-04-29 14:17:09 +0200
commit85e3c53e5c5e2de993c90ece324a68d0ff62f417 (patch)
tree6f078576f01f18afcdae773e48664640ce795abe /mkspecs
parent2e749c089f6fd93909e7cd4cc8129f2969b35185 (diff)
parent7f943968ade6a65321d4a00822f5b3a034a19e0c (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/aix-xlc/qmake.conf2
-rw-r--r--mkspecs/android-g++/qmake.conf2
-rw-r--r--mkspecs/features/cmake_functions.prf23
-rw-r--r--mkspecs/features/ctest_testcase.prf3
-rw-r--r--mkspecs/features/qt_app.prf34
-rw-r--r--mkspecs/features/qt_build_config.prf16
-rw-r--r--mkspecs/features/qt_parts.prf26
-rw-r--r--mkspecs/features/qt_tool.prf23
8 files changed, 94 insertions, 35 deletions
diff --git a/mkspecs/aix-xlc/qmake.conf b/mkspecs/aix-xlc/qmake.conf
index adcac80ea1..c4efebff24 100644
--- a/mkspecs/aix-xlc/qmake.conf
+++ b/mkspecs/aix-xlc/qmake.conf
@@ -34,6 +34,8 @@ QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_RTTI_ON = -qrtti
+QMAKE_CXXFLAGS_RTTI_OFF = -qnortti
QMAKE_COMPILER_DEFINES += __xlC__
QMAKE_INCDIR =
diff --git a/mkspecs/android-g++/qmake.conf b/mkspecs/android-g++/qmake.conf
index 7e78725858..d1b94bb1aa 100644
--- a/mkspecs/android-g++/qmake.conf
+++ b/mkspecs/android-g++/qmake.conf
@@ -179,6 +179,6 @@ QMAKE_LIBS_THREAD =
QMAKE_LIBS_EGL = -lEGL
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_OPENGL_ES1 = -lGLESv1_CM
-QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $$QMAKE_LIBS
+QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
load(qt_config)
diff --git a/mkspecs/features/cmake_functions.prf b/mkspecs/features/cmake_functions.prf
index 1285990206..08295da75f 100644
--- a/mkspecs/features/cmake_functions.prf
+++ b/mkspecs/features/cmake_functions.prf
@@ -40,3 +40,26 @@ defineReplace(cmakeTargetPaths) {
}
return ($$join(out, " "))
}
+
+defineReplace(cmakePortablePaths) {
+ variable = $$1
+ out =
+ for(v, variable) {
+ out += ${CMAKE_FIND_ROOT_PATH}$$cmakeTargetPath($$v)
+ }
+ return ($$join(out, ";"))
+}
+
+defineReplace(cmakeProcessLibs) {
+ variable = $$1
+ out =
+ for(v, variable) {
+ if(!equals(v, -framework)) {
+ v ~= s,^-l,,
+ v ~= s,^-lib,,
+ v ~= s,.lib$,,
+ out += $$v
+ }
+ }
+ return ($$join(out, ";"))
+}
diff --git a/mkspecs/features/ctest_testcase.prf b/mkspecs/features/ctest_testcase.prf
index 3045a21672..be972e0864 100644
--- a/mkspecs/features/ctest_testcase.prf
+++ b/mkspecs/features/ctest_testcase.prf
@@ -57,6 +57,8 @@ isEmpty(CMAKE_VERSION) {
dependentmodules -= $$CMAKE_QT_MODULES_UNDER_TEST
dependentmodules = $$cmakeModuleList($$dependentmodules)
+ contains(QT_CONFIG, angle): CMAKE_ANGLE_DEFINE = -DQT_WITH_ANGLE=True
+
CMAKE_MODULE_VERSIONS =
CMAKE_MODULES_UNDER_TEST =
for (MODULE_UNDER_TEST, CMAKE_QT_MODULES_UNDER_TEST) {
@@ -74,6 +76,7 @@ isEmpty(CMAKE_VERSION) {
cmake $$_PRO_FILE_PWD_ $$CMAKE_GENERATOR \
-DCMAKE_VERBOSE_MAKEFILE=1 \
$$CMAKE_MODULE_DEFINES \
+ $$CMAKE_ANGLE_DEFINE \
-DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} \
-DCMAKE_PREFIX_PATH=$$CMAKE_PREFIX_PATH \
-DQt5_MODULE_TEST_DEPENDS=\"$${dependentmodules}\" \
diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf
new file mode 100644
index 0000000000..8758f4a9a0
--- /dev/null
+++ b/mkspecs/features/qt_app.prf
@@ -0,0 +1,34 @@
+#
+# 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.
+#
+
+TEMPLATE = app
+
+load(qt_build_paths)
+DESTDIR = $$MODULE_BASE_OUTDIR/bin
+
+isEmpty(QMAKE_INFO_PLIST): CONFIG -= app_bundle
+
+host_build: QT -= gui # no host tool will ever use gui
+host_build:force_bootstrap {
+ !build_pass: CONFIG += release
+ 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
+ target.path = $$[QT_INSTALL_BINS]
+}
+INSTALLS += target
+
+load(qt_targets)
+load(qt_common)
diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf
index 4cbd08910c..a29e09cbc5 100644
--- a/mkspecs/features/qt_build_config.prf
+++ b/mkspecs/features/qt_build_config.prf
@@ -50,3 +50,19 @@ CONFIG += \
# Qt modules get compiled without exceptions enabled by default.
# However, testcases should be still built with exceptions.
exceptions_off testcase_exceptions
+
+
+defineTest(qtBuildPart) {
+ bp = $$eval($$upper($$section(_QMAKE_CONF_, /, -2, -2))_BUILD_PARTS)
+ isEmpty(bp): bp = $$QT_BUILD_PARTS
+ contains(bp, $$1): return(true)
+ return(false)
+}
+
+defineTest(qtNomakeTools) {
+ qtBuildPart(tools): return()
+ for (d, 1) {
+ $${d}.CONFIG += no_default_target no_default_install
+ export($${d}.CONFIG)
+ }
+}
diff --git a/mkspecs/features/qt_parts.prf b/mkspecs/features/qt_parts.prf
index 37dc849f83..ed028d59d3 100644
--- a/mkspecs/features/qt_parts.prf
+++ b/mkspecs/features/qt_parts.prf
@@ -19,22 +19,24 @@ TEMPLATE = subdirs
bp = $$eval($$upper($$TARGET)_BUILD_PARTS)
!isEmpty(bp): QT_BUILD_PARTS = $$bp
-sub_src.subdir = src
-sub_src.target = sub-src
-SUBDIRS = sub_src
+exists($$_PRO_FILE_PWD_/src/src.pro) {
+ sub_src.subdir = src
+ sub_src.target = sub-src
+ SUBDIRS += sub_src
-exists($$_PRO_FILE_PWD_/tools/tools.pro) {
- sub_tools.subdir = tools
- sub_tools.target = sub-tools
- sub_tools.depends = sub_src
- !contains(QT_BUILD_PARTS, tools): sub_tools.CONFIG = no_default_target no_default_install
- SUBDIRS += sub_tools
+ exists($$_PRO_FILE_PWD_/tools/tools.pro) {
+ sub_tools.subdir = tools
+ sub_tools.target = sub-tools
+ sub_tools.depends = sub_src
+ # conditional treatment happens on a case-by-case basis
+ SUBDIRS += sub_tools
+ }
}
exists($$_PRO_FILE_PWD_/examples/examples.pro) {
sub_examples.subdir = examples
sub_examples.target = sub-examples
- sub_examples.depends = sub_src
+ contains(SUBDIRS, sub_src): sub_examples.depends = sub_src
examples_need_tools: sub_examples.depends += sub_tools
!contains(QT_BUILD_PARTS, examples): sub_examples.CONFIG = no_default_target no_default_install
SUBDIRS += sub_examples
@@ -44,7 +46,7 @@ exists($$_PRO_FILE_PWD_/examples/examples.pro) {
exists($$_PRO_FILE_PWD_/demos/demos.pro) {
sub_demos.subdir = demos
sub_demos.target = sub-demos
- sub_demos.depends = sub_src
+ contains(SUBDIRS, sub_src): sub_demos.depends = sub_src
examples_need_tools: sub_demos.depends += sub_tools
!contains(QT_BUILD_PARTS, examples): sub_demos.CONFIG = no_default_target no_default_install
SUBDIRS += sub_demos
@@ -53,7 +55,7 @@ exists($$_PRO_FILE_PWD_/demos/demos.pro) {
exists($$_PRO_FILE_PWD_/tests/tests.pro) {
sub_tests.subdir = tests
sub_tests.target = sub-tests
- sub_tests.depends = sub_src # The tests may have a run-time only dependency on other parts
+ contains(SUBDIRS, sub_src): sub_tests.depends = sub_src # The tests may have a run-time only dependency on other parts
tests_need_tools: sub_tests.depends += sub_tools
sub_tests.CONFIG = no_default_install
!contains(QT_BUILD_PARTS, tests) {
diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
index 46d031fb32..0a588807c8 100644
--- a/mkspecs/features/qt_tool.prf
+++ b/mkspecs/features/qt_tool.prf
@@ -9,30 +9,9 @@
# We mean it.
#
-TEMPLATE = app
-
-load(qt_build_paths)
-DESTDIR = $$MODULE_BASE_OUTDIR/bin
+load(qt_app)
CONFIG += console
-isEmpty(QMAKE_INFO_PLIST): CONFIG -= app_bundle
-
-host_build: QT -= gui # no host tool will ever use gui
-host_build:force_bootstrap {
- !build_pass: CONFIG += release
- 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
- target.path = $$[QT_INSTALL_BINS]
-}
-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.