Go to file
Alexandru Croitor a285bcba26 Ugly fix for handling QT_SOURCE_TREE
QT_SOURCE_TREE is a variable that is set in qtbase/.qmake.conf.
In qtbase, it's used throughout various
projects to find cpp sources when building standalone tests (among
other things).
Everything works fine with qmake, because even if qmake is invoked
on the tests subfolder, qmake searches up the source directory tree
until it finds a .qmake.conf file, and uses that.

When building qttools with qmake, the qdoc project expects
to have a QT_SOURCE_TREE value, but it's not actually set in the
qttools/.qmake.conf file, so the generated include paths that use
that value are incorrect. Curiously the build still succeeds.

Now in CMake land we replaced QT_SOURCE_TREE with
CMAKE_SOURCE_DIR, but that does not work properly when doing a
standalone tests build, because the project in that case is the
tests one, and not the qtbase one, so configuration fails in a
developer build when trying to configure some private tests.

So far I've found that only qtbase actively uses this value.
A temporary fix is to save the qtbase source directory into a
QT_SOURCE_TREE variable inside the generated
BuildInternalsExtra.cmake file.

The pro2cmake script is changed to handle presence of QT_SOURCE_TREE
in a qrc file path. This is handled by finding the location of a
.qmake.conf file starting from the project file absolute path.
This is needed to stop the script from crashing when handling
the mimedatabase test projects for example.

The change also regenerates the relevant failing test projects, and
thus standalone tests (when doing developer builds aka private_tests
enabled) now configure and build successfully.

Change-Id: I15adc6f4ab6e3056c43ed850196204e2229c4d98
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-29 13:16:14 +00:00
bin Fix toolchain path when doing non-prefix builds 2019-07-03 16:09:55 +00:00
cmake Ugly fix for handling QT_SOURCE_TREE 2019-07-29 13:16:14 +00:00
coin Split module_config.yaml 2019-07-04 07:06:52 +00:00
config.tests Merge commit 'dev' into 'wip/cmake-merge' 2019-04-16 16:32:08 +02:00
dist Merge remote-tracking branch 'origin/5.12' into dev 2019-06-25 13:04:27 +02:00
doc Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake 2019-07-11 17:17:51 +02:00
examples Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake 2019-07-11 17:17:51 +02:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
mkspecs Merge remote-tracking branch 'origin/5.13' into dev 2019-07-05 15:37:50 +02:00
qmake Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake 2019-07-11 17:17:51 +02:00
src Fix exporting of Core tools 2019-07-24 09:01:24 +00:00
tests Ugly fix for handling QT_SOURCE_TREE 2019-07-29 13:16:14 +00:00
util Ugly fix for handling QT_SOURCE_TREE 2019-07-29 13:16:14 +00:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake 2019-07-11 17:17:51 +02:00
.qmake.conf Merge remote-tracking branch 'origin/dev' into wip/qt6 2019-07-08 13:20:48 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
CMakeLists.txt Fix exporting of Core tools 2019-07-24 09:01:24 +00:00
config_help.txt Add -qtlibinfix-plugins for renaming Qt plugins according to QT_LIBINFIX 2019-05-16 06:22:25 +00:00
configure Teach configure to run either qmake or cmake 2019-05-16 13:54:15 +00:00
configure.bat Configure: simplify logic 2019-03-14 12:13:58 +00:00
configure.cmake Fix mapping of features to private features 2019-07-22 08:29:33 +00:00
configure.json Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake 2019-07-11 17:17:51 +02:00
configure.pri Add qmake support for c++2a 2019-04-19 08:14:25 +00:00
dependencies.yaml Add initial dependencies.yaml file 2019-07-02 14:45:36 +03:00
header.BSD Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.FDL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL-EXCEPT Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3-COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-NOGPL2 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-ONLY Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.MIT qsimd: add support for new x86 CPU features 2018-05-05 06:20:07 +00:00
INSTALL INSTALL: Remove outdated reference to Windows CE 2019-02-13 13:01:57 +00:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Remove LICENSE.GPLv3, LICENSE.LGPLv21, LGPL_EXCEPTION.txt 2018-04-16 11:02:14 +00:00
LICENSE.QT-LICENSE-AGREEMENT-4.0 Replace commercial preview license with Qt License Agreement 4.0 2018-06-21 11:39:15 +00:00
qtbase.pro nuke configure -host-option 2016-12-13 18:55:59 +00:00
sync.profile platformsupport/input: add xkbcommon utilities lib 2019-03-01 14:31:28 +00:00