summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix linking of tst_qtcpsocket on LinuxSimon Hausmann2019-08-091-0/+6
| | | | | | | | | | The direct use of pthread_yield() requires pthread linkage, which -- according to the cmake docs -- is best done by using CMake's Threads::Threads target and the -pthread compiler flag preference. Change-Id: Iacbd7dfce3ee2f792cea7f58d52b6b8ba8a84b18 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Simplify resource embedding for qml modulesSimon Hausmann2019-08-093-19/+9
| | | | | | | | | | | | | | | | | | | | * Add support for a QT_RESOURCE_PREFIX target property, that add_qt_resource respects. This makes it convenient to add files to the resource system for a project without the need to repeat prefixes. In qmake land with multiple resources they're repeated in the foo.prefix variables or in the prefix attribute in .qrc files. * Since /qt-project.org/imports is in the default QML import search path and the hierarchy under the import search paths is "regulated", we might as well make add_qml_module set QT_RESOURCE_PREFIX on the target. We can compute the correct value for that. This allows removing the redundant prefix from the add_qt_resource() calls for the qml files. Change-Id: Ic15130dc9e432340fc3edf93e35f2a803b4b40eb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Remove unused parameters for add_qml_moduleSimon Hausmann2019-08-091-2/+0
| | | | | | Change-Id: Ic7774aa401089061b153920e51537e1c2264ce4f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Fix dependencies for source file generated through rccLeander Beernaert2019-08-091-1/+1
| | | | | | | | | There was a missing dependency rule which would cause the generated cpp file to not be updated when changes were made to a qrc file generated through add_qt_resource(). Change-Id: I9544c2fb6cf49529913f731b8fb6fc524d65e40c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for QTQUICK_COMPILER_SKIPPED_RESOURCESSimon Hausmann2019-08-092-4/+13
| | | | | | | | | Detect this in the conversion script and map it to a source file property. When that's the case, avoid repeating the file list but instead store it in a variable. Change-Id: If3119d83914bb798766e27351746b4e867bd3ab3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Minor variable naming cleanupSimon Hausmann2019-08-091-4/+4
| | | | | Change-Id: I47f07a22c356ca545052f63788756068a51c3e39 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix sourceless qml test caseLeander Beernaert2019-08-091-40/+45
| | | | | | | | | Minor tweaks to make sure QML test cases without source files work as expected. Change-Id: I30b72622692b8f36d01f7a17b9d1456b0ab223ea Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Enable quick compiler for qml files in add_qt_resourceLeander Beernaert2019-08-091-164/+158
| | | | | | | | | | | | | | | File passed into add_qt_resource are check to see if they match valid qml files extension. Those which match the latter are then processed by the qt quick compiler should the qmlcachegen target be present. We also ensure that any remaining resources are properly chainloaded. If the qmlcachegen target can't be located a warning be will be issued asking for the inclusion of QmlTools in the find_package command. Change-Id: Ieecd38670e15c21d94dc549b31c7d87f2383d9af Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix and streamline header inclusionAlexandru Croitor2019-08-081-35/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | While trying to port qtgraphicaleffects, when trying to configure the project with a non-prefix build, the configuration fails with the following error: CMake Error in src/effects/CMakeLists.txt: Imported target "Qt::Qml" includes non-existent path "../qt_cmake/qtdeclarative_built_developer/include" This is because we incorrectly export public include directories that point to an "/include" folder under the repo build dir, whereas in a non-prefix build the syncqt "/include" folder is actually in the qtbase build dir. Fix this, by introducing a new variable called "foo_repo_include_dir" which will point to the correct include directory regardles of prefix or non-prefix build. This variable is set by qt_internal_module_info. Fix all relevant places to use this new variable. Also streamline and remove any unncessary include directories in all our functions, thus making everything consistent and hopefully easier to understand. Change-Id: Icbe884701275c7754daecadcdba18048b4d779d0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Extend handling of special condtionsLeander Beernaert2019-08-081-2/+2
| | | | | | | | | Extend the hanlding of special condtions outside single line statements. Conditions such as 'qtHaveModule(gui):qtConfig(opengl(es1|es2)?)' would not be handled properly. Change-Id: I992f75311b82d84c574c9cb4ef6d7d648f425d81 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add support for converting qtTargetLibrary() value assignmentsLeander Beernaert2019-08-083-2/+31
| | | | | | | | | | | | | | | | | | Add support to pro2cmake to handle variable assignments via functions, e.g: TARGET = $$qtTargetLibrary($$TARGET). The evalulation of the functions happens during parsing and is very rudementary in nature. Currently it only covers the qtTargetLibrary(), required for certain projects, and quote(), required for passing unit tests. If we run into any unhanlded function an exception will be thrown. This patch also changes the TARGET property on Scope to expand the value. Change-Id: I678b7058067348a3972944bdba110f556cf22447 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Fix conversion of SUBDIR pro files not in current directoryLeander Beernaert2019-08-081-8/+16
| | | | | | | | | | | | This patch fixes the processing of pro files that do not reside in the current directory. Before this patch statements such as SUBDIRS += Foo/Bar/z.pro would cause z.pro to be parsed in the current CMakeLists.txt. What we want instead is a call to add_subdirectory(Foo/Bar). Failing to do so leads to issues with relative paths specified in z.pro being invalid. Change-Id: I7bfa7837d54877e5340081d1c9aebe855cf6796d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Handle DESTDIR overrideLeander Beernaert2019-08-071-0/+5
| | | | | | | | Set OUTPUT_DIRECTORY on a target when DESTDIR is specified. Change-Id: I72061ae8156356fcb2aa9ba6cb87049fcef600c7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Handle qmake's CONFIG=pluginLeander Beernaert2019-08-071-6/+6
| | | | | | | | | In some tests in qtdeclarative we have projects that are built as a lib with CONFIG=plugin. Without these changes they would be translated to an add_qt_module call. Change-Id: I208d31d43b087ed0b87eb4715f6c49b218fcc2c5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate some of the test projects that do SUBDIRS += fooAlexandru Croitor2019-08-0710-42/+89
| | | | | | | | | This show cases the new cleaner subdirs handling code in pro2cmake. Change-Id: I25001942ef020e4c4191b355f55309c4fb033ecc Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Handle conditions for SUBDIRS *more* correctlyAlexandru Croitor2019-08-071-56/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | There are project files that not only do SUBDIRS -= foo depending on some condition, but also SUBDIRS += foo. To handle these cases correctly we need to do a whole pass across all scopes and collect all addition and subtraction conditions. Once we have that information, we can compute a final condition for a particular subdirectory. After we have the condition information for all subdirectories, we can simplify all those conditions using SimPy, and group all subdirectories that have the same simplified condition. Finally we print out the subdirectories grouped by the simplified condition. The end result is similar to how we have extend_target() calls with multiple sources grouped into a single conditional call, except in this case it's subdirectories. Amends b26b1455d75709a53f50e1d3d41c384f8e90b576. Change-Id: I5b648ac67264ba9a940561baee5b49c43c13b721 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Perform check for tool builds before srcLeander Beernaert2019-08-071-2/+3
| | | | | | | | | | Perform the test whether tools should be built before entering the source directory of a project. In QtDeclarative this would result in a configuration error since the tools are used while building everything under src. Change-Id: I33ce2cb317ef221836d696654f3bb4e39db47e54 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix typo in QtBuild.cmakeLeander Beernaert2019-08-071-1/+1
| | | | | | | Fix typo for set command. Change-Id: I1881bf77cab47ef37081065057200a72a2bc7e8f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix regular expression for add_qml_moduleLeander Beernaert2019-08-061-1/+1
| | | | | | | | Values such as Foo.2 would no longer be converted into Foo due to an error in the regular expression. Change-Id: I6a11d02662782094f5b264f86a930d9aaf002c77 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix shared resource paths in testsLeander Beernaert2019-08-061-1/+10
| | | | | | | | | Resources shared by tests were incorrectly setup. Resources would always be registered with BASE/filename as alias. In these cases the fix is to set the alias with the original file name. Change-Id: I667ce7b74ae5f86740c8bb8a040cc2895a3dc116 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix add_qml_module URILeander Beernaert2019-08-062-9/+9
| | | | | | | | Make sure the URI name for qml modules correctly strips out the version number for instances such as QtQuick.Controls.2. Change-Id: I18e706b371323eeefdd6d7564b922265fa5cad3f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix qml plugin conversion: always install qml filesLeander Beernaert2019-08-061-8/+9
| | | | | | | | | | Always install qml files regardless of whether the install_qml_files configuration is present in qmake. This was causing most unit tests to fail due to missing qml files. Change-Id: I53c7200cfa66805d0e459190ef105c1a73c34a5f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Propagate library/plugin resources automatically when linking staticallySimon Hausmann2019-08-061-1/+14
| | | | | | | | | | | | | The rcc generated code relies on global constructors to register the resources. The object file of the generated code is included by default in shared libraries and executables. However when the object file ends up in a static library, the linker will discard the object file when nothing references any of the symbols in that object file, when linking the static library into the executable/shared library. The solution is to link the object file straight into the final target, by means of a cmake object library. Change-Id: I02ad1173e4f7e8f907022c906640dc9086233676 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix $$_PRO_FILE_PWD substitutionLeander Beernaert2019-08-051-1/+3
| | | | | | | | | | | | | | | | | | PRO_FILE_PWD should return CMAKE_CURRENT_SOURCE dir without any compenstation for mistmatching directory locations as we are doing with PWD. There are test that use a shared .pri project file which gets included into the .pro file of test. In this .pri file we have a statement such as DEFINES += QT_QMLTEST_DATADIR=\\\"$${_PRO_FILE_PWD_}/data\\\". Since the .pri project file is located in ../../shared/shared.pri the substitution would result in ${CMAKE_CURRENT_SOURCE_DIR}/../../shared/data instead of the expected ${CMAKE_CURRENT_SOURCE_DIR}/data. Change-Id: Id899d6a624acc45425af47ca9aa1b332cf63e659 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add __default_public_args to add_qt_test and add_qt_executableLeander Beernaert2019-08-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Due to the missing argument processing on PUBLIC arguments we could run into situations where the defines for an executable (mostly tests) would be incorrectly processed. If one were to pass a define into a test that also specifies public libraries, the defines passed in by test would fall under the PUBLIC_LIBRARIES argument in add_qt_executable. For instance, in a test with DEFINES Foo PUBLIC_LIBRARIES Core would cause arg_DEFINES to be "Foo=BAR;PUBLIC_LIBRARIES;Core". This combined with the defines specified by add_qt_test would result in the following string "Foo=BAR;PUBLIC_LIBRARIES;Core;TEST_DIR=..." and would cause TEST_DIR to be treated as a public library in add add_qt_executable. For some reason I can't figure out, these two defines end up in the linker flag section of certain test programs. There is nothing wrong with the rest of the propagation chain into add_qt_executable. My best guess is that it has something to do with the generators. In any case add an explicit -D fixes the issue. Change-Id: I340790c1c2426fa76785d1bd1b3332a904323d56 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate tests/auto/corelib/kernel.proAlexandru Croitor2019-08-012-11/+51
| | | | | | | | Makes the conditions nicer to look at. Change-Id: If07b4f96892e459a7e7a6a4f541311ebda11b1a8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Implement condition simplification for add_subdirectory conditionsAlexandru Croitor2019-08-011-1/+24
| | | | | | | | | | | This makes the SUBDIRS -= foo conditions simplified and nice to look at. Amends b26b1455d75709a53f50e1d3d41c384f8e90b576. Change-Id: I9ffe3db1e358f94fb65a885cc90c44218482825b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Regenerate qsocketnotifier testAlexandru Croitor2019-08-012-9/+36
| | | | | | | Remove the previously wrongly committed CMakeLists.gen.txt file. Change-Id: I75e87865a9f2b237d321d29f92e25aee5f7febb9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix pro2cmake to handle QT default values properlyAlexandru Croitor2019-08-011-1/+4
| | | | | | | | | | | | Setting the "QT" SetOperation which defaults to "core" and "gui", should only be done once on the top-level .pro scope. To distinguish the top level scope, we need to check for both an empty parent_scope and an empty base_dir. Amends 9e96c384261ca1329d3143295d013701eb85b186 Change-Id: I9db1cbf0e6592c8c195d11b97b3eff40b1adbcbd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Small fix to correctly handle default argumentsAlexandru Croitor2019-08-011-4/+8
| | | | | | | | Dictionaries are mutable, and should not be assigned as a default parameter. Change-Id: Id08c17f89c17b404560241849603e1e1a0ec6562 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Refactor QML_FILES for add_qml_moduleLeander Beernaert2019-08-013-93/+238
| | | | | | | | | | | | | | | | | | | | | | | | | It has been decided, that going forward all qml files are to be added to a module via the resource system. This patch does the ground work to make sure all qml modules in the qt codebase follow these new conventions. New properties on targets have been added so that we can't track all the qml related information for later use. To make sure it is still possible to install qml files we added the qt_install_qml_files() command. Pro2cmake has been adjusted to handle the special cases of versioned qml modules (e.g: QtQuick.2). It will now insert a TARGET_PATH override to avoid the default conversion from the URI parameter. Finally, this patch temporarliy disables the quick compiler by moving all relevant code into a dummy function. This will be removed in a follow up patch where the quick compiler will be enable for all qml files present in resource files. Change-Id: I09fe4517fad26ec96122d9c7c777dbfbd214905c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Properly convert default QT directiveJędrzej Nowacki2019-08-013-2/+5
| | | | | | | | | | | | If unset QT by default has value: "core gui". This patch adds this behavior by pre-defining the value in the root scope. qmimedata CMakeList.txt was re-generated. Change-Id: Ib8b6064bc46c72d829e0077d09f21bbfb494e137 Reviewed-by: Qt CMake Build Bot Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Implement SUBDIR-= conversion in pro2cmake toolJędrzej Nowacki2019-08-0128-29/+566
| | | | | | | | | | | | | | | | | | CMake doesn't support removing subdirectories therefore one need to convert all removal to conditional adds. The resulting code doesn't win a beauty contest. That is because handle_subdir works on already processed strings which means it doesn't have access to the boolean operations. As such it can not minimize the expressions, but it works and in the most simple cases it is pretty good. The patch re-generates CMakeLists.txt under tests/auto/corelib/kernel excluding qcoreapplication, qmetatype, qmimedata, qobject, qtimer, which are suffering from unrelated problems, like for example Gui, pthread linkage issues. Change-Id: I18a02f6eda7a3b41b1313211c8bc9ce277bb67be Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add Qt Quick Compiler supportLeander Beernaert2019-07-312-14/+122
| | | | | | | | | | | | This patch adds support for the qtquick compiler feature, which will embed the compiled qml files as resources along with the respective qml_loader. This patch also changes the add_qml_module call to require either EMBED_QML_FILES and/or INSTALL_QML_FILES to be specified. Change-Id: I32d29c9b554b8286ed3b980027a56dd4abe11c92 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix add_qml_module() with non-static buildsSimon Hausmann2019-07-301-1/+1
| | | | | | | | | Make sure that the .qml/.js/.mjs files are copied or installed into their target destination. Change-Id: Ib1649e5168c9fe3a570800af92d82293e5b295d6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Fix creation of generated plugin cpp files in static buildsAlexandru Croitor2019-07-301-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | When building qtdeclarative against a static iOS qtbase build, QtNetwork is find_package'd twice, once in the top level CMakeLists.txt file, and once by the qtuiotouchplugin which has Network as a dependency. This meant that the static plugins that Network exposes had auto import cpp files generated twice, which failed the configuration of qtdeclarative. To fix this, don't generate the same file more than once. To do that, protect the inclusion of the FooPlugins.cmake file, to only be included once in every directory scope. That can be achieved by setting a variable to TRUE when the target does not exist yet. If the target exists in the same scope, that means that find_package() was called a second time in the same scope, so there is no need to include the Plugins file. Change-Id: I9d7c3e7b7c22c2b4526cf1d717b9d15919f213f3 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Protect against extending imported host targetsAlexandru Croitor2019-07-301-2/+24
| | | | | | | | | | | | | When cross-compiling qtdeclarative, add_qt_tools makes sure to import the host tool and not build it. But there are also some extend_target and add_qt_resource calls which try to extend the host tool. Make sure to protect those functions not to do anything if they are called on an imported target. Change-Id: Ifd8bcab8e56ad389a8c145382b23bd2c1bda5e81 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Ugly fix for handling QT_SOURCE_TREEAlexandru Croitor2019-07-2912-28/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Permit the use of qml cache file generation even inside qtdeclarativeSimon Hausmann2019-07-291-7/+0
| | | | | | | | | After re-arranging subdirs, the cmake target level dependencies can handle building qmlcachegen before running the custom command for generating cache files. Change-Id: I8a35b2b5bfd2fdf4b49462ff9c27e5f3075254fc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Enable network testLiang Qi2019-07-2974-5/+1565
| | | | | | | Task-number: QTBUG-74146 Change-Id: Ib29d1531f89676afb2b4df5032529b731ace029d Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix testdata handlingAlexandru Croitor2019-07-292-6/+22
| | | | | | | | | | | | | | Make sure to handle glob expressions in the entire path given, not just the end of the path. This handles tests like qsslkey and qnetworkreply. Also copy/install the testdata in the final test directory path under a "testdata" subdir. Previously INSTALL_TESTDIR was used, which was never set to anything. Change-Id: I2408e12f586cadeb524ffa249e851a4179324b23 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* Add support for qmlcachegenLeander Beernaert2019-07-291-1/+86
| | | | | | | | This patch adds support for qmake's qmlcache feature. It's enabled when option EMBED_QML_FILES is not present in add_qml_module. Change-Id: I9b35f0bda7dfaf777f55c14eaf3d763f9b550fa4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add EMBED_QML_FILES option to add_qml_moduleLeander Beernaert2019-07-252-11/+25
| | | | | | | | Some projects in QtQuickControls force the qml files to embedded into the binary. This change exposes an option to mimic that bevhavior. Change-Id: I4cbf0c21c05ca03b8dd1189eb7d81e43279c7157 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix QML_FILES conversionLeander Beernaert2019-07-251-1/+1
| | | | | | | | | | Use a the more appropriate scope.get_files() to retrieve the qml file list from the qmake project. This makes it more consitent with the rest of the conversion script and fixes some issues with incorrect aliases in qrc files. Change-Id: I8907516be9457ba0d60d14af53d241197637aa9f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Extend add_qt_test to support qmltestcaseLeander Beernaert2019-07-242-16/+67
| | | | | | | | | | | | | | | Extend add_qt_test for qmltest by setting the option QMLTEST when we detect the config qmltestcase. We also forwards the GUI option to the tests when detected. This is a requirement for some QtQuickControls2 tests. Finally when doing a prefix build, we add the install directory to the QT_PLUGIN_PATH environment variable. Change-Id: I3b2ecb494955976e98abbcf3d03925c314336122 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add missing QT_INSTALL_DIR paths to qml files and test dataLeander Beernaert2019-07-241-5/+22
| | | | | | | | | | | | | Make sure that paths passed to qt_copy_or_install are prefixed with QT_INSTALL_DIR so that they behave correctly with prefix and non-prefix builds. Make sure that plugin.qmltypes and qmldir are also copied to binary dir when doing prefix builds to match qmake's behavior. Change-Id: I6f87ed478e797c9f66dbf85264904ad29a60ad95 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Regenerate qtextedit testAlexandru Croitor2019-07-241-4/+28
| | | | | | | | | It was not built previously on macOS due to private_tests feature misbehaving, and thus it now fails due to incorrect framework linkage. Regenerate it. Change-Id: I2f4338e3ef3bf160ae4f13083e8da5f8db47b9c0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix exporting of Core toolsAlexandru Croitor2019-07-242-3/+3
| | | | | | | | | | | | | | | It should happen after qmake is built, to make sure that the target is made global, otherwise when cross-building qtbase in another build tree, the configuration phase will fail due to not finding qmake. qmake was accidentally exported before if you configured qtbase twice, because the tool was kept around in a cache variable, the second configuration actually recreated the CoreToolsConfig.cmake file to contain qmake as well. Change-Id: I6941e83f7d6bd03c56de120fba1d18e50c4af0e4 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix define value for QtQuiLeander Beernaert2019-07-231-1/+1
| | | | | | | A define was placed in the wrong section. Change-Id: Ibaf16fc45d51d99f7581bc98d6df334972b04278 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Fix mapping of Apple platforms in pro2cmake.pyAlexandru Croitor2019-07-237-52/+102
| | | | | | | | | | | | "mac" scope in qmake actually means all mac platforms, just like "darwin", aka macOS, iOS, watchOS, etc. Regenerate corelib, gui and testlib after this modification. This is a requirement for the iOS port. Change-Id: I029c7e907d13f6ec31816a08602a5930f9ac16a7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot