summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Enable building of the mysql pluginVille Voutilainen2019-09-025-2/+81
| | | | | | Change-Id: I8cb97afaaed46ee64b5a133e797179d7ddecdeef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Don't include module syncqt header locations if syncqt was not runAlexandru Croitor2019-09-021-17/+27
| | | | | | | | | | | | When building QtQmlDevTools we don't generate syncqt headers, but the non-existent include paths were still added, which means that anything that used QtQmlDevTools would fail to configure (the standalone tests). Make sure to only add the include paths if syncqt was executed. Change-Id: I6d79ecf53e9a5d396e8df801584ce2c9f119f9be Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Decide whether to build tools when doing a standalone test buildAlexandru Croitor2019-09-021-0/+1
| | | | | | | | Needed for qtdeclarative standalone tests. Change-Id: Ie012528d0d553cb63c2d79f3ded35e45872ee89a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Fix add_qt_resource to handle resources in static builds properlyAlexandru Croitor2019-08-301-2/+14
| | | | | | | | | | | | | | | | | | Whenever the qml compiler is used to process qml files from a resource, and there are no resources left after all qml files have been processed, make sure to propagate the created resource target to add_qt_resource, so that the target is associated properly with an export name. Additionally the generated qml cache loader file uses private Qml headers. Thus the object library that contains the cpp file should have qml as a dependency (and not the target that will link to the object library). Change-Id: Ib385a900823df3e015492cdd06acd8a0cb9f8e9a Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix default platform plugin choice for WASMSimon Hausmann2019-08-301-1/+1
| | | | | | | | The name (key in wasm.json) for the QPA plugin is "wasm", not "webassembly". Change-Id: I6a2568d05e4f19408fa95ac59a47acdcf90e11a2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix Harfbuzz detectionSimon Hausmann2019-08-302-2/+2
| | | | | | | | | | | | We use qt_find_package(harfbuzz PROVIDED_TARGETS harfbuzz::harfbuzz) which would set harfbuzz_FOUND. Since variable names are case-sensitive, this is also the name we must check for in the qt feature condition. Change-Id: I43420489c3310bc9c3e5cc798a005c8d5b0ab646 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Override qmlimportscanner path in android deployment settingsLeander Beernaert2019-08-301-1/+10
| | | | | | | | Override the default binary path for qmlimportscanner so that it points to the host build specified via QT_HOST_PATH. Change-Id: Ib0b47e61315c87ce6225e2d8ca84043cae03357d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update Android build configurationLeander Beernaert2019-08-304-44/+76
| | | | | | | | | | | | | | | | | | Update Android build configuration to be compatible with the multi-arch android build patch to qmake. We can now build and generate the apk correctly. Executing on the device/simulator will only work once the latest changes from 5.14 have been merged in. We now replace target suffix with ${CMAKE_ANDROID_ARCH_ABI}.[so|a] so we don't have to deal with handling targets which might have any of the OUTPUT_NAME properties set. The dependency and deploy settings generation has also been updated to append the file contents to a string and then do a single file write at the end. Change-Id: Id3c5bd0428141ecaf962124a100390e3a4e41feb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix qtdeclarative static buildsAlexandru Croitor2019-08-301-0/+5
| | | | | | | | qmlplugindump is not build during a Qt static build, so there's no point in creating custom targets that would run the tool. Change-Id: Id7d6d44da63312f298f46eab08a5637cb0c97c8f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Share most common part of module_config.yamlLiang Qi2019-08-306-120/+176
| | | | | Change-Id: Ieea5b662e039cff24e26a127b4a3a8610ed588cc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix WASM platform detectionSimon Hausmann2019-08-301-1/+1
| | | | | | | | | At the moment we only support building with Emscripten, so that's the system name to look for. Change-Id: I08782ed0201da1593058bf1fb2ec61d6660802ed Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix build with EmscriptenSimon Hausmann2019-08-301-1/+1
| | | | | | | | | Don't try to build the ibus input context plugin when targeting Emscripten, as there's no ibus there. Change-Id: I949a09c4bacd3136b632e597dd8048653d0c0fea Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix static builds after revamp of add_qt_resourceAlexandru Croitor2019-08-303-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first issue is that instead of arg_OUTPUT_TARGET we should use rcc_OUTPUT_TARGET (there was also a typo in the OUTPUT word). The second issue came with the fact that the object library targets that were created for resources had a "Qt6::" namespace prefix in the exported Targets files, and yet the link generator expression did not contain the prefix. This failed when building qtsvg in a static build, because the exported object library could not be found. The solution is to use the TARGET_NAME generator expression which takes care of adjusting the name of the target when exported, thus making the linking work both when building qtbase and when building qtsvg. This had the fallout, that all resource object libraries need to be associated with an export set and installed. This wasn't the case for plugins, because plugins have an export name of the form "FooTargets", whereas the export name for the resource object library is "Qt6FooTargets". Adjust the export names of plugins to be the same as for modules and resource library objects (aka contain the "Qt6 prefix"). Change-Id: I1ca28d20c51e4447e5783cc20571a68ec77f6513 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Be more verbose on required environment variablesMaurice Kalinowski2019-08-281-1/+1
| | | | | | | | Make sure to document both variables are required when invoking cmake. Otherwise, one might be omitted causing side-effects. Change-Id: I3390df1cb5352ea6113952c99fcedef5336f2fc1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add Qt Mqtt to the library mappingMaurice Kalinowski2019-08-281-0/+1
| | | | | Change-Id: Ifa50161a579647002d3349b49da7012660c59f81 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix "mkspec selection" when building with EmscriptenSimon Hausmann2019-08-281-0/+2
| | | | | Change-Id: Id9d466221294651c2f8dfde149d82f45b4081238 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix CMake errors around linker flags when targeting WASMSimon Hausmann2019-08-281-1/+4
| | | | | | | | | | | * The -no-undefined linker option only makes sense for shared libraries. The WASM build is a static build though. * The -gc-sections linker option is only relevant for host tools and certainly applicable to the WASM toolchain. Change-Id: Ib8daec66a6d80f5025887448882dd891e6176268 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix architecture detection with WASM buildsSimon Hausmann2019-08-281-0/+11
| | | | | | | | | This is a simple mis-understanding between try_compile assuming interest in the launching part of the thing we try to compile and our architecture test being interested in the binary. Change-Id: Ie972b662b6f34699f566649bb2c1e29da35b58c3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add missing qml-root-path for AndroidLeander Beernaert2019-08-283-18/+23
| | | | | | | | | | | | Add missing qml root path variable in the deployment configuration file. Not having this variable will cause androiddeployqt not use the qml dependency scanner to package all relevant dependencies. This patch also fixes QT_ANDROID_BUNDLED_FILES files not being processed. Change-Id: I5bca33cdbb57098f283b38516b777571806da9e5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix subdir handling in pro2cmakeAlexandru Croitor2019-08-281-13/+35
| | | | | | | | | | | | | | | Conditions scopes that had "else" were not handled properly. The "else" condition should be expanded to its proper negative full form. Also every condition "piece" should be wrapped with parentheses before being passed to sympy simplification, to be sure that boolean operator precedence is applied properly. Refactored the code a bit to make it easier to read. Change-Id: I4726845b867f93c3afbc9362cdce1cd063ccff63 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix handling of more functions in handle_function_valueAlexandru Croitor2019-08-281-1/+2
| | | | | | | | Essentially pass them through without failing the whole conversion process. Change-Id: I7bbd198203f79b45120a7254e2ecdf58e32f9525 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix some corner cases of condition mapping in pro2cmakeAlexandru Croitor2019-08-281-1/+8
| | | | | | | | | | | | | | | | | no-png is an old unused scope that should be mapped to the png feature instead. Map contains(QT_CONFIG, shared) to correct variable check. Sympy doesn't like dashes in indentifiers, so replace all of them with a _dash_ token which will be replaced again at the end of the condition simplifying. When doing sympy preprocessing, fix mapping of target names that don't contain double colons. Change-Id: Id3d37800665c96505b7cbb1d80fdbed59c3ae9c0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Augment conversion scripts with requirements for qttools part 2Alexandru Croitor2019-08-281-0/+2
| | | | | | | Designer components target names need to be prefixed with Qt. Change-Id: I13037820b080d88cd670f2db97232509eb868daf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Augment conversion scripts with requirements for qttoolsAlexandru Croitor2019-08-282-0/+16
| | | | | | | | | The libclang test is implemented as a custom FindWrapLibClang module. The module does mostly the same things as the configure test in qmake land. Change-Id: I965f284baf7daef074e22f033047c35a917c8808 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix qt_get_module_for_plugin to work with interface librariesAlexandru Croitor2019-08-281-0/+7
| | | | | | | | | Assume that interface libraries can't have plugins for now, otherwise we'll need to change the "MODULE_PLUGIN_TYPES" property name to include INTERFACE_ as a prefix. Change-Id: I21b64179ded5fd10216d843a21ee149e002793f3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add Support for Android Bearer JarLeander Beernaert2019-08-272-2/+20
| | | | | | | This is required to package an apk which depends on QtDelcarative. Change-Id: I1f6bdeb984f08d73f010fb4210242e5c99f1969f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove ../ from TargetsLeander Beernaert2019-08-261-1/+3
| | | | | | | | | Remove repeating '../' pattern from target names, since we generate the targets in the correct location with CMake. Change-Id: I89d527a9ad717f742f8d0e5921f378e6ac0a229d Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add OUPUT_DIRECTORY option to add_qt_testLeander Beernaert2019-08-261-3/+6
| | | | | | | | | | From all the observed cases, the parameters given to OUTPUT_DIRECTORY tend to be CMAKE_CURRENT_BINARY_DIR, which was the default value. This change is mainly to avoid add_qt_test failing if OUTPUT_DIRECTORY is specified. Change-Id: I26b931dd33ad1e991b64c14cc11b4b7a713fc858 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Use GLOB_RECURSE for testdataLeander Beernaert2019-08-261-2/+1
| | | | | | | | | | Use GLOB_RECURSE for testdata instead of globbing the top level folder. Although RCC supports scanning directories, it will result in alias collosions and test not being able to find the files on platforms where test data is embedded into the binary. Change-Id: I35d3d46a5d9fcafa5c8dc833eafdd0044ffe355f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Do not use quick compiler with embedded test dataLeander Beernaert2019-08-231-0/+7
| | | | | | | | | Prevent the quick compiler running on embedded test data for platforms such as Android. This breaks certain assumptions about the test setup otherwise. Change-Id: I1026da3e16552256623de26b843ea32ed2c4260e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update public CMake macros' versionLeander Beernaert2019-08-237-51/+51
| | | | | | | Update all public Qt macros to use qt6/QT6 instead of qt5/QT6. Change-Id: Ib178f4fa21f37dfb8da7d4d8c097aa0e96c9d9f9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Skip emebedding test data when there is no targetLeander Beernaert2019-08-231-14/+17
| | | | | | | | | On android test data is embedded into to the binary via resources. This will not work with sourceless tests such as the qml only test cases. Change-Id: I3ecf28223b3c7c6dae4ca3f15519adc028082598 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Link against Qml when using quick compilerLeander Beernaert2019-08-231-1/+1
| | | | | | | | When using the quick compiler to compile qml files, add an explicit dependency on Qml. This will result in linker errors otherwise. Change-Id: Ib7af0e8ec1b48822fd0d3c3556f10d24f10e7489 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Handle contains(CONFIG, static) in pro2cmakeAlexandru Croitor2019-08-231-0/+1
| | | | | | | Change-Id: I36717688dd3b2ff0f6730bf3d65be421e391895f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* Add support for Qt header_modules aka a header only INTERFACE libraryAlexandru Croitor2019-08-233-46/+115
| | | | | | | | | | Also add support for modules that have no private module counterpart. Both are needed for Designer's QtUiPlugin in qttools. Change-Id: Ia7e9d8837140e1de5cd59e196b4f63481ab68298 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Qt CMake Build Bot
* Fix more uses of functions in handle_function_valueAlexandru Croitor2019-08-231-1/+2
| | | | | | | Change-Id: Ie6b6f79b50e9eaf605427f19a8c2ca86050e2f74 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* Add some clarifying documentation in QtPostProcessAlexandru Croitor2019-08-231-0/+13
| | | | | | | | | | Specifically what each of the list variables in qt_internal_create_module_depends_file is used for. Change-Id: Ie4f8c0d7387308518932d37e802ecaeb0572b955 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* Fix creation of ModuleDepends header file with correct dependenciesAlexandru Croitor2019-08-231-1/+3
| | | | | | | | | | The content of the generated header files should reference both public and private Qt module dependencies. This is the same as what qmake does. Change-Id: I2e47c93291d677b86af7bb80fb788b2acf939743 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Qt CMake Build Bot
* Abstract and fix usages of QT_KNOWN_MODULESAlexandru Croitor2019-08-232-20/+44
| | | | | | | | | | | | | | | | | In some places of the build system we need to iterate over repo specific Qt known modules (aka the ones that are built in the current project). In other places we need to iterate over the whole list of known Qt modules (those found via find_package + the ones built in the current project). Introduce two separate functions that provide access to either the former or latter, and adjust all existing usages of QT_KNOWN_MODULES as needed. Change-Id: Ica96d0cfe690b9aaaa3f8c53bc84975bccad69c7 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* Regenerate tests that use helper processesAlexandru Croitor2019-08-2311-37/+15
| | | | | | | | | | This is needed to make sure the output directory is in the correct place somewhere under tests, rather than in $prefix/bin. Change-Id: I98afa9c0a7517a8a10866b4c626bd4c4d2fd214f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Qt CMake Build Bot
* Update pro2cmake example generation to use QT5_ADD_RESOURCESLeander Beernaert2019-08-231-10/+18
| | | | | | | | | Update pro2cmake to generate CMake projects where resources are handled via the QT5_ADD_RESOURCES command. Change-Id: I66dc2174a45fc652fd8c9b7e3c0f46f58ae02c0c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Extend run_pro2cmake.py to pass --is-example to pro2cmakeLeander Beernaert2019-08-231-1/+7
| | | | | | | | | Add command line argument to make run_pro2cmake invoke pro2cmake with the --is-example option so we can convert examples in bulk. Change-Id: I162eddffc509f16a97de5517698e8daca5207b74 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Replace invalid symbols with underscoreLeander Beernaert2019-08-221-0/+1
| | | | | | | | | When building tests for android some resources names had the "#" character in them which triggered a CMake error when use in conjunction with add_custom_target() Change-Id: If5f471eebb027683e86b0c4e38c2f34ff8891b7a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix missing prefix for test data on androidLeander Beernaert2019-08-221-0/+1
| | | | | | | | Add missing required resource prefix to add_qt_resource() call when embedding test data as a resource. Change-Id: I9130f9ae863daae80221a1475b077b1d2e501f6d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Extract add_qt_resource into reusable componentsLeander Beernaert2019-08-225-286/+355
| | | | | | | | | | | | | | | | | | | | | | | | This patch moves all of the underlying code for add_qt_resource into a common reusable snippet for both the Qt build and user projects. For users, the new API is available under QT5_ADD_RESOURCES. If outfiles is a CMAKE target we will use the new API, otherwise we will fall back to the old behavior. This patch also adds EXTRA_CMAKE_FILES and EXTRA_CMAKE_INCLUDES to add_qt_module so that module specific cmake files can be installed and loaded by the module's config.cmake. The code will be installed under CMAKE_BINARY_DIR/Qt{}CoreResource.cmake and is injected into Qt{}Core_Config.cmake via the extra cmake includes passed into add_qt_module. To make sure it still works with QtBuild, we do the actual generation of the file from QtBaseGlobalTargets and include the generated file there as well. Change-Id: I85fefaa11dde01a6790d23c62d6a64cd157e2617 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix Android build for other Qt modulesLeander Beernaert2019-08-162-1/+5
| | | | | | | Install missing QtBuildInternalsAndroid to installation path. Change-Id: I6141ff72b57a6445f1718bc17d64a7ed59a91620 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix QT_WILL_BUILD_TOOLS evaluationLeander Beernaert2019-08-161-1/+5
| | | | | | | | | This condition was not being properly evaluated since the cached variable was treated as a string. Any checks with if(QT_WILL_BUILD_TOOLS) would just verify whether the string was empty or not. Change-Id: Ie8b9ecc8249a1e9f5c0aa1b13d5bef686fcb04de Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix qmake build in developer buildsLeander Beernaert2019-08-161-0/+2
| | | | | | | | When building with developer builds, all targets are built with warnings as errors. In CMake this also applies to the qmake build. Change-Id: Ie62681d6c4756c106f5931a2a7d452a18dfa45f1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix developer warnings that a plugin does not belong to a Qt moduleAlexandru Croitor2019-08-161-2/+6
| | | | | | | | | | | | | | | | | | | | When building qtsvg or qtimageformats there are a bunch of configuration warnings like: The plug-in 'qtiff' does not belong to any Qt module. This happens because qt_get_module_for_plugin() checks for modules only in the QT_KNOWN_MODULES variable. find_package()'d modules will not appear there though, but only in QT_ALL_MODULES_FOUND_VIA_FIND_PACKAGE. Change the function to check for Qt modules in both variables. This fixes all the warnings regarding plugins not belonging to a module. Change-Id: I39e668801a93794b62888cf868b97c55f57dccdd Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge branch 'wip/qt6' into wip/cmakeAlexandru Croitor2019-08-15757-4663/+9052
|\ | | | | | | Change-Id: I50ac36b8803c296998149e98cc61e38687cdd14b