Go to file
Alexandru Croitor d2931a2626 CMake: Handle standalone config.tests in configure libraries section
Some library entries in configure.json have a test entry.
An example is assimp in qtquick3d.

qmake tries to find the library via the sources section, and then tries
to compile the test found in config.tests/assimp/assimp.pro while
automagically passing it the include and link flags it found for assimp.

We didn't handle that in CMake, and now we kind of do.

configurejson2cmake will now create a corresponding
qt_config_compile_test call where it will pass a list of packages and
libraries to find and link against.

pro2cmake will in turn generate new code for the standalone
config.test project. This code will iterate over packages that need to
be found (like WrapAssimp) and then link against a list of passed-in
targets.

In this way the config.test/assimp/main.cpp file can successfully
use assimp code (due to propagated include headers).

qt_config_compile_test is augmented to take a new PACKAGES argument,
with an example as follows

PACKAGES PACKAGE Foo 6 COMPONENTS Bar
         PACKAGE Baz REQUIRED

The arguments will be parsed and passed to the try_compile project,
to call find_package() on them.

We also need to pass the C/C++ standard values to the try_compile
project, as well as other try_compile specific flags, like the
toolchain, as given by qt_get_platform_try_compile_vars().

Change-Id: I4a3f76c75309c70c78e580b80114b33870b2cf79
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-03 16:05:19 +02:00
bin CMake: Provide script to configure and build one or more tests 2020-03-23 09:54:48 +01:00
cmake CMake: Handle standalone config.tests in configure libraries section 2020-04-03 16:05:19 +02:00
coin Coin: Fix incorrect target OS values used in instructions 2020-04-02 09:39:27 +02:00
config.tests CMake: Port the 'separate_debug_info' feature 2020-03-06 13:38:37 +01:00
dist Add 5.14.0 changelog entry about MinGW 2020-02-18 18:34:50 +01:00
doc Merge remote-tracking branch 'origin/5.15' into dev 2020-03-04 14:39:18 +00:00
examples Remove the regexp example 2020-03-31 15:28:23 +02:00
lib
mkspecs qmake: Silence GL deprecations on macOS 2020-03-27 09:00:11 +00:00
qmake Re-generate various CMake projects and configure after merge 2020-03-16 20:43:56 +01:00
src Make setRange methods in QValidator subclasses non-virtual 2020-04-03 16:05:04 +02:00
tests Fix irrelevant error case in QSplitter test 2020-04-02 08:09:31 +02:00
util CMake: Handle standalone config.tests in configure libraries section 2020-04-03 16:05:19 +02:00
.gitattributes
.gitignore Ignore some build artifacts when doing in-tree builds with cmake 2020-04-02 07:41:33 +01:00
.qmake.conf Bump version 2020-02-02 13:41:14 +01:00
.tag
CMakeLists.txt CMake: Fix pkgconfig calls when cross-compiling 2020-03-26 12:46:16 +01:00
config_help.txt Merge remote-tracking branch 'origin/5.15' into dev 2020-02-26 18:39:21 +01:00
configure Add convenience forwards/translations to cmake configure wrapper 2020-04-01 22:57:18 +02:00
configure.bat Don't compile qmake in c++11 mode 2020-02-03 17:43:30 +01:00
configure.cmake CMake: Report which qt parts will be built by default 2020-04-02 09:39:31 +02:00
configure.json CMake: Port the 'separate_debug_info' feature 2020-03-06 13:38:37 +01:00
configure.pri Android: Increase minimum API level to Android-23 / Android 6 2020-03-04 08:28:04 +01:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02: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
LICENSE.GPL2
LICENSE.GPL3
LICENSE.GPL3-EXCEPT
LICENSE.LGPL3
LICENSE.LGPLv3 Remove LICENSE.GPLv3, LICENSE.LGPLv21, LGPL_EXCEPTION.txt 2018-04-16 11:02:14 +00:00
LICENSE.QT-LICENSE-AGREEMENT Update enterprise license agreement v4.2.1 2019-12-18 13:07:19 +02:00
qtbase.pro nuke configure -host-option 2016-12-13 18:55:59 +00:00
sync.profile Move QOpenGLWidget from QtOpenGL to its own module 2020-02-18 09:22:51 +01:00