qt5base-lts/qmake
Alexandru Croitor c7fd10a022 Allow building the tests directory as a standalone CMake project
At the moment, Coin builds tests as a separate qmake invocation
against an installed Qt. We need to support the same with CMake.

Change the tests subdirectory to be a standalone CMake project when
CMake does not detect an existing QtTest target while processing the
subdirectory. If the target exists, it means we are building the whole
repo, if the target does not exist, we need to call find_package
to find the installed Qt.

Refactor and move around a few things to make standalone tests build
successfully:
- add a new macro to set up paths to find QtSetup
- add a new macro to find all macOS frameworks
- add a new macro to set up building tests
- add a new macro that actually builds the tests
- export the INSTALL_CMAKE_NAMESPACE value into the BuildInternals
  Config file
- export the CMAKE_BUILD_TYPE value, because a test project doesn't
  have a .git subdir and thus defaults to be built in Release
  mode, even though qtbase might have been built in Debug, so to
  avoid the mixing, the propagate the build type
- stop overriding INSTALL_CMAKE_NAMESPACE and
  QT_CMAKE_EXPORT_NAMESPACE inside QtSetup if they are set, because
  the tests project doesn't specify a major version, and if we
  override the values, the moc / uic targets don't get the correct
  major version prefix and configuration fails

Change-Id: Ibdb03687302567fe325a15f6d1cb922c76240675
Fixes: QTBUG-75090
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-22 11:12:54 +00:00
..
doc Merge remote-tracking branch 'origin/5.12' into 5.13 2019-04-05 10:57:24 +02:00
generators Fix precompiled headers with clang-cl 2019-04-09 21:58:54 +00:00
library Replace Q_DECL_NOTHROW with noexcept the remaining places 2019-04-09 14:48:42 +00:00
cachekeys.h Updated license headers 2016-01-21 18:55:18 +00:00
CMakeLists.txt Allow building the tests directory as a standalone CMake project 2019-05-22 11:12:54 +00:00
main.cpp Let QINSTALL copy hidden files when installing directories 2019-04-09 08:16:25 +00:00
Makefile.unix qmake: add $$read_registry() function 2019-01-05 20:33:07 +00:00
Makefile.unix.macos Merge remote-tracking branch 'origin/5.8' into dev 2016-12-13 09:39:20 +01:00
Makefile.unix.mingw fix "make clean" of qmake in a builddir with spaces on mingw 2017-12-14 18:06:31 +00:00
Makefile.unix.unix Move the readlink(2) wrapper to qcore_unix.cpp 2017-07-08 02:18:16 +00:00
Makefile.unix.win32 qmake: add $$read_registry() function 2019-01-05 20:33:07 +00:00
Makefile.win32 Clang: Enable precompiled header for qmake 2019-03-21 23:46:20 +00:00
meta.cpp qmake: Remove dead code 2019-04-05 07:48:34 +00:00
meta.h qmake: Remove dead code 2019-04-05 07:48:34 +00:00
option.cpp qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
option.h qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
project.cpp qmake: make argument validation of built-ins data driven 2018-06-27 17:23:57 +00:00
project.h Merge remote-tracking branch 'origin/5.7' into dev 2016-07-19 20:14:40 +02:00
property.cpp Compile with QT_STRICT_ITERATORS defined 2018-11-26 07:04:24 +00:00
property.h move generation of qconfig.cpp (and qt.conf) to qmake-based configure 2016-12-13 18:56:12 +00:00
qmake_pch.h qmake: move QT_BEGIN_NAMESPACE to correct place 2018-12-19 19:21:35 +00:00
qmake-aux.pro revert to building qmake with qconfig.cpp 2017-01-06 20:09:08 +00:00
qmake.pro Merge remote-tracking branch 'origin/5.13' into dev 2019-02-20 09:51:12 +01:00