From bc4fbcd215b72951d37db57103365963f3849fbc Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 16 Apr 2013 13:38:19 +0200 Subject: Add IMPORTED targets for the GL libraries used by Qt. There may be multiple libraries specified in the mkspec, such as EGL and Mali, as used in devices/linux-sh4-stmicro-ST7108-g++, so create an imported target for each one. Also populate the Qt5Gui_EGL_LIBS variable with all created imported targets. Similar variables are created for the used OPENGL implementation. In the case of using the packaged ANGLE library, we already know the exact locations of the binaries. This makes it possible for third parties to use the same GL implementation as used by the Qt build itself. As these are used only privately by QtGui, they are also added to the DEPENDENT_LIBRARIES of that target so that they are found for rpath-link usage. On some platforms (eg Raspberry Pi), multiple include directories must be set to include egl.h, as the headers it includes for vcos are a bit scattered. Task-number: QTBUG-29132 Change-Id: I1126da3d37cd51c88d3670347c8b6405b285efb5 Reviewed-by: Volker Krause Reviewed-by: Stephen Kelly --- mkspecs/features/cmake_functions.prf | 23 +++++++++++++++++++++++ mkspecs/features/ctest_testcase.prf | 3 +++ 2 files changed, 26 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/cmake_functions.prf b/mkspecs/features/cmake_functions.prf index 1285990206..1e7c0e23f7 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}\" \ -- cgit v1.2.3 From 839e275249f3bd210a303ddcca32d3015cab5ca7 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 22 Apr 2013 22:00:10 +0200 Subject: Use the CMake list separator for content in a CMake list. Change-Id: I664c31d256d395d4afec81de66a84dc79ed10b9d Reviewed-by: Volker Krause Reviewed-by: Stephen Kelly --- mkspecs/features/cmake_functions.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/cmake_functions.prf b/mkspecs/features/cmake_functions.prf index 1e7c0e23f7..08295da75f 100644 --- a/mkspecs/features/cmake_functions.prf +++ b/mkspecs/features/cmake_functions.prf @@ -47,7 +47,7 @@ defineReplace(cmakePortablePaths) { for(v, variable) { out += ${CMAKE_FIND_ROOT_PATH}$$cmakeTargetPath($$v) } - return ($$join(out, " ")) + return ($$join(out, ";")) } defineReplace(cmakeProcessLibs) { -- cgit v1.2.3 From 34673203788dad6817fe1aaa21ca7432a32330d3 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 23 Apr 2013 17:07:01 +0200 Subject: Don't list all QMAKE_LIBS in QMAKE_LIBS_OPENGL_ES2. There is no need to, and it confuses the generation of cmake files. Change-Id: I00c8751990e707cf32652babcb9af3e4b681561a Reviewed-by: Oswald Buddenhagen --- mkspecs/android-g++/qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') 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) -- cgit v1.2.3 From fda41c185779dc22a8841509806707776231b6af Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 25 Apr 2013 17:12:07 +0200 Subject: groundwork for making "configure -nomake tools" sane the idea is that "tools" actually means "graphical applications". that means that all bootstrapped/build tools are consistently built, regardless of their location in the source tree. non-bootstrapped non-graphical tools are a bit of a grey area. it's going to be decided on a case-by-case basis. Change-Id: I28b959b7e659d8aa86cf6769ab6d2689c855ec6b Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_build_config.prf | 16 ++++++++++++++++ mkspecs/features/qt_parts.prf | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'mkspecs') 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..cf59ed6e0e 100644 --- a/mkspecs/features/qt_parts.prf +++ b/mkspecs/features/qt_parts.prf @@ -27,7 +27,7 @@ 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 + # conditional treatment happens on a case-by-case basis SUBDIRS += sub_tools } -- cgit v1.2.3 From f1fd824ebb843d6ca82f2ecdf14eb0112bf2df5e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 26 Apr 2013 11:59:56 +0200 Subject: make src/ subdir optional there is at least one examples-only repo (qtwebkit-examples). we look for tools/ only when src/ is also present, based on the assumption that if there was only tools/, it would be actually named src/ (like in qttools). the split between the two is nowadays arbitrary anyway. Change-Id: I982b1d0e26dd7d0a5de751546099a58f86390124 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_parts.prf | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_parts.prf b/mkspecs/features/qt_parts.prf index cf59ed6e0e..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 - # conditional treatment happens on a case-by-case basis - 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) { -- cgit v1.2.3 From 940f7c8744db8fe8b4002019550ca383a1cf5d3f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 26 Apr 2013 14:15:34 +0200 Subject: split qt_app.prf out of qt_tool.prf this way we can use it for "regular" apps (gui tools) as well. Change-Id: I3b00d0bde215dff1c2726b35626c4c0c256d92c2 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_app.prf | 34 ++++++++++++++++++++++++++++++++++ mkspecs/features/qt_tool.prf | 23 +---------------------- 2 files changed, 35 insertions(+), 22 deletions(-) create mode 100644 mkspecs/features/qt_app.prf (limited to 'mkspecs') 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_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. -- cgit v1.2.3 From 3511b199ddbd423b2c159887b27f4eba1a3182d1 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 22 Apr 2013 23:39:27 +0200 Subject: Define QMAKE_CXXFLAGS_RTTI_{ON|OFF} for aix-xlc mkspec Task-number: QTBUG-26393 Change-Id: I2d676ad6004c3fad2ef0a3ab990d6e120ed7f73c Reviewed-by: Oswald Buddenhagen --- mkspecs/aix-xlc/qmake.conf | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mkspecs') 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 = -- cgit v1.2.3