summaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* Fix add_qt_resource behavior with regards to unspecified prefixesSimon Hausmann2019-08-091-0/+3
| | | | | | | | | | | This change makes the PREFIX parameter a required parameter if the target does not specify a default. This way the behavior is clear when reading the code: add_qt_resource() without PREFIX means it must come frmo the target. Change-Id: I79024e70e7b4d32a5164b93aa08ec9ff409b2d39 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* Simplify resource embedding for qml modulesSimon Hausmann2019-08-092-12/+8
| | | | | | | | | | | | | | | | | | | | * 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-091-1/+1
| | | | | | | | | 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>
* 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 add_qml_module URILeander Beernaert2019-08-061-5/+3
| | | | | | | | 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>
* 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>
* 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>
* Refactor QML_FILES for add_qml_moduleLeander Beernaert2019-08-012-78/+186
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add Qt Quick Compiler supportLeander Beernaert2019-07-311-13/+111
| | | | | | | | | | | | 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-293-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix testdata handlingAlexandru Croitor2019-07-291-1/+10
| | | | | | | | | | | | | | 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-251-11/+23
| | | | | | | | 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>
* Extend add_qt_test to support qmltestcaseLeander Beernaert2019-07-241-6/+44
| | | | | | | | | | | | | | | 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
* Fix building examples when doing a Qt static buildAlexandru Croitor2019-07-221-1/+11
| | | | | | | | | | | | | | | | | | The build failed due to two different reasons. We tried to assign properties on an aliased target, which does not work. Make sure to set properties on the original unaliased target. We tried to query for the value of the QT_DEFAULT_PLUGINS property when automatically linking to plugins, but the generator expression failed in the AND section, because querying for an unexisting value does not return an integer, and the AND expression expects an integer. The fix is to wrap the relevant expression in a BOOL generator expression. Change-Id: Ia065bc1de939cee49e5de0b2aef70e356cc5419a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Fix warnings regarding QML pluginsAlexandru Croitor2019-07-221-3/+5
| | | | | | | | | | Some author warnings don't make sense when dealing with QML plugins, like the messages regarding CLASS_NAME or not belonging to a certain module. Take care not to print those warnings in those cases. Change-Id: I017bd63cca650dc262337949242e813b7b6a56cc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix non-prefix builds for non qtbase reposAlexandru Croitor2019-07-222-9/+21
| | | | | | | | | | | | | | | | QT_WILL_INSTALL was previously always set to ON when doing a qtdeclarative build, because CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT evaluated to false due to always having to set CMAKE_INSTALL_PREFIX to point to the qtbase build directory. Instead of recomputing the value of QT_WILL_INSTALL, compute it once while configuring qtbase, and add it to the generated QtBuildInternalsExtra.cmake file, so it propagates to all other repos that will be built. Change-Id: If8bf63e7501b5758fe7aa0f799cb0746704f4811 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Simplify add_qml_module codeLeander Beernaert2019-07-221-48/+154
| | | | | | | | | | | | | | | | Reduce the amount of code required to add a qml plugin to cmake by making add_qml_module wrap the add_qt_plugin code where required. add_qml_module will also create a dummy target so that qml files will appear as source files in an IDE when no cpp files are present. CXX_MODULE qmake parameter has been dropped in favor of an explicit IMPORT_VERSION parameter, since it was only used to determine the version when the IMPORT_VERSION was not specified. Change-Id: I4a4b626566720d04c62d246ca521db8c4a95b10f Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Handle TESTDATA for Qt TestsLeander Beernaert2019-07-161-3/+51
| | | | | | | | | | | | | | | | These changes enable the support to handle test data and install or package them as resources when appropriate. This change does not handle the GENERATED_TESTDATA or TEST_HELPER_INSTALLS since there are very few occurrences of these and we can handle those as special cases. Finally, in add_qt_test, only append CMAKE_CURRENT_SOURCE_DIR if the path is not absolute. Change-Id: Ic20b9749d10e2a09916f2797606116471c64850b Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for QML pluginsLeander Beernaert2019-07-151-3/+142
| | | | | | | | | | | | | | | | | | Add the necessary code to both the QtBuild and pro2cmake to be able to handle qml plugins in qt declarative. Add condition replacement for QTDIR_build to QT_BUILDING_QT so that certain qml examples work correctly when being built in the build directory. Fix add_qt_resources not being updated during build after changes were made. Files list used as dependencies were not populated. Add missing module mappings for qtdeclarative. Change-Id: I0f71d0a3a0e7e97ba96807950d11cffaee04d9b2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Fix CMake moc scanner to look for new macro Q_NAMESPACE_EXPORTAlexandru Croitor2019-07-111-0/+7
| | | | | | | | | | | | | | f66c1db16c050c9d685a44a38ad7c5cf9f6fcc96 in qtbase introduced a new macro that the moc scanner has to look for. Set an explicit list of macros to look for in the CMAKE_AUTOMOC_MACRO_NAMES property of every target that has AUTOMOC enabled, otherwise CMake AUTOMOC won't run moc on files that contain the new macro. Change-Id: Id991a70d773cef66716621803a88e96b44a80650 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: implement default qpa plugin behavior for static buildsJean-Michaël Celerier2019-07-053-10/+30
| | | | | | | | | | | | | | | | | This is done by adding a DEFAULT_IF argument to add_qt_plugin, which accepts if-evaluated expressions. e.g. add_qt_plugin(myplugin DEFAULT_IF ${foo} STREQUAL ${bar} ... ) so that this mechanism can be reused later if necessary. Change-Id: I7eba9adaaa28e55a4f0f94cf206e868b990027e6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: allow client apps to load static plug-insJean-Michaël Celerier2019-07-053-18/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | Based in part on Kyle Edwards's implementation : https://codereview.qt-project.org/c/qt/qtbase/+/243731 Example : ``` cmake_minimum_required(VERSION 3.15) project(foo) add_executable(foo main.cpp) find_package(ICU COMPONENTS i18n uc data REQUIRED) find_package(Qt6 COMPONENTS Core Gui REQUIRED) target_link_libraries(foo Qt6::Core Qt6::Gui) qt_import_plugins(foo INCLUDE Qt6::qxcb EXCLUDE Qt6::qgtk3 Qt6::qeglfs-kms-integration Qt6::qjpeg ) ``` Change-Id: If7736c42f669f7d7f43052cae59c28fc7fcb4156 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix toolchain path when doing non-prefix buildsAlexandru Croitor2019-07-031-0/+7
| | | | | | | | | | | Previously the cmake install prefix was added twice during a non-prefix build, which evaluated to an incorrect path. Set another absolute dir variable, and use that instead. Change-Id: I73099510dadc8f401d5a763f21840c9671686c10 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Add auto detection routines for androidLeander Beernaert2019-06-273-1/+64
| | | | | | | | | | Add QtAutoDectect cmake which has routines to handle the vcpkg detection as well as set up some android configuration parameters. The latter will contribute towards keeping the cmake configuration commands shorter when targeting android. Change-Id: I721291c8dce39b5c298565a46867ddcab2df90e8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Update README for other Android architecturesLeander Beernaert2019-06-271-1/+10
| | | | | | | | Update the cmake README file with explanations on how to target the other available Android architectures. Change-Id: Id7653abc4a1a6fbb96797014ce2ca2e6bb49943d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Prospective fix for using qt-cmake when %PATH% changes and using NinjaSimon Hausmann2019-06-261-0/+5
| | | | | | | | | Mixing compilers won't work well on Windows, so if qtbase is built using cl.exe and Ninja and then later cmake is called on another module and gcc is found in %PATH%, then cmake will prefer that. Let's avoid that. Change-Id: I8294482939efa6a16e0a4df8df3aeef8243c3657 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix error in run_config_test_architectureLeander Beernaert2019-06-261-1/+1
| | | | | | | | | The run_config_test_architecture() function in QtBaseConfig was not working correctly as we were not updating the length of the line properly. Change-Id: I29c5b45f1fa36d16cb2ef00950feb80987f6b176 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix osx deployment target and sysroot propagation in the qt toolchainSimon Hausmann2019-06-262-0/+12
| | | | | | | | | We need to save them in the toolchain file, otherwise we can't compile anything :) Change-Id: Ic5c53524fa4aa05d0b3229c2905dff92ca437ec1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Android: Final changes for APK generationLeander Beernaert2019-06-265-1/+231
| | | | | | | | | | | | | | | | | | | | Generate the ${MODULE}-android-dependencies.xml for the androiddeployqt tool. This will ensure all the right plugins and dependencies are packaged when generating the apk. This change also changes the visibility for executable to default/public. Not having this will cause the application to crash as we can't locate main() in the executable (shared library). Additionally pro2cmake conversion script has been updated to perform the required conversions for the Android settings. Finally, the 6 projects in QtBase that have Android dependencies have been updated with the new script and the step that produces the xml files in run at the end in QtPostProcess.cmake. Change-Id: I9774ba1b123bc11cae972fa37054ef2c51988498 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add windows batch file for convenient cmake invocation with Qt toolchain fileSimon Hausmann2019-06-251-0/+3
| | | | | | | | | Similar to the shell script, this makes it easier to invoke cmake by just extending your PATH. Change-Id: I1f83e93c507032f6ecf4838c11d62f49f4d93ed6 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Allow prefix builds with developer-build as feature enabledSimon Hausmann2019-06-252-10/+15
| | | | | | | Just like with qmake, separate the two "features". Change-Id: Idf2a796c7c4aaa740c471688b2221d7041fed643 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix building against an installed static QtSimon Hausmann2019-06-253-11/+13
| | | | | | | | | | | | | | | | For ICU we have multiple components, and ICU becomes a public dependency to QtCore. When storing the INTERFACE_QT_PACKAGE_COMPONENTS property, make sure to store the entire list of components, not just the first component -- by turning the semi-colon separated list into a space separated list. When processing the components at find_dependency time, we need to reverse that and pass COMPONENTS directly to ensure a correct parameter expansion. Change-Id: I24a0708520e7d5fba039395a151034aee4d4c0e2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Prepare tests for running in the CISimon Hausmann2019-06-251-2/+6
| | | | | | | | | | | | | | * Add labels so that ctest --print-labels and ctest -L <label> gives insight over the test plan and the ability to run easily individual tests. * Unfortunately we can't do the TESTARGS indirection for arguments as coin does with testlib, so instead pass the parameters to generate the xml unconditionally. Change-Id: I289de9c15c516e3ac3fe04771fdbd8d7a083ff1f Reviewed-by: Qt CMake Build Bot Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix vcpkg default target triplet setting in the qt toolchain fileSimon Hausmann2019-06-241-1/+1
| | | | | | | Due to scoping this variable needs to be written into the cache. Change-Id: I2704fe9ac138210571e0b7acada5eb5c65e265af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Check for the correct apple clang version with warnings_are_errorsAlexandru Croitor2019-06-241-1/+1
| | | | | | | | | | The current state of qtbase is confirmed to be built with no warnings when using up to Xcode 9.2, as per the check in mkspecs/features/qt_common.prf. Add the same check for the CMake build. Change-Id: I0c2409ece048e93fba29c41a8bd053dd112949bd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix tools dependencies in associated modules when cross-compilingSimon Hausmann2019-06-241-1/+4
| | | | | | | | | | | When cross-compiling we take a shortcut in add_qt_tool() for moc, etc. as the tools are already imported from the host build of Qt. However we must still add the tools as a dependency in for example QtCore so that when the cross-compiled QtCore is used, the host tools are implicitly imported. Change-Id: I83e4fd7f21e18472c0965c90c058dd2b55b6ec65 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix tools dependencies lookup when cross-compilingSimon Hausmann2019-06-241-0/+8
| | | | | | | | | | | When the host system uses 64-bits for pointers and the target 32-bits, then locating the tools dependencies would fail due to the mismatch. Since the tools dependencies don't create linkable targets but merely import executables, we can skip this check like in commit 914b367c7f6a117130b8a56338c46a8102a1f77f. Change-Id: I1ebd0867e4cce34f42df21dc8e8d9176a83a9cac Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>