summaryrefslogtreecommitdiffstats
path: root/configure.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Fix mapping of features to private featuresSimon Hausmann2019-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | When a feature generates a private feature, we should not just repeat the condition but also make it depend on the original feature. In qmake features had different outputs, while we have a 1:1 mapping. For example the developer_build feature had "private_tests" as an output feature. There's no condition attached to the feature and auto-detect is off, so we'd generate qt_feature("developer_build" AUTODETECT OFF) qt_feature("private_tests" AUTODETECT OFF) and that's wrong, because when the user enables the visible feature (developer_build) we want it to propagate to the private_tests feature. Change-Id: Id8408864802fa1e1ed9e67a5f47d1d2fde38d321 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Generate the c++xx standard features instead of skipping themAlexandru Croitor2019-06-031-1/+38
| | | | | | | | | | | The features are reused in qtdeclarative (and maybe somewhere else too), so they should be present. We can still map the conditions to proper CMake compile feature tests. Change-Id: I4d307d29d4d293cc23ab005b195ea346087c7162 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Wrap DBus1 find_package call to fix xproto not being picked upTobias Hunger2019-05-101-1/+1
| | | | | | | | | | | | | | DBus1 (1.12) configuration file breaks PKG_CONFIG environment variables and will thus prevent other libraries to be picked up by pkgconfig. Main sympthom is that xproto is not getting picked up anymore, which results in hundreds of lines of warnings about this being printed. Work around that by wrapping the call to find_package(DBus1) and restoring the environment. Change-Id: Ia69f10b014dddc32045b40972500a843e5d29b38 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Make zlib a required package for QtCoreAlexandru Croitor2019-05-031-0/+1
| | | | | Change-Id: Ifbb969fafe05e355d6874d8bebe2e8f1e80510ff Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Improve mapping of librariesTobias Hunger2019-05-031-1/+2
| | | | | | | | | | | | | Merge all data related to mapping libraries into one data structure in helper.py. Use that data for everything related to library mapping. This change enables way more features now like e.g. adding find_package calls into generated files. Change-Id: Ibbd2a1063cbeb65277582d434a6a672d62fc170b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: configurejson2cmake: Do not generate useless OPTIONALsTobias Hunger2019-05-031-3/+0
| | | | | | | | | | Do not set properties of packages to type OPTIONAL. That is the default anyway. Update generator script and generated files. Change-Id: I7a4d043b69c93ce8c2929a2e27ac6a07e4e6d8cc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Write find_dependency() calls in Qt Module config filesAlexandru Croitor2019-05-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a new function called qt_find_package() which can take an extra option called PROVIDED_TARGETS, which associates targets with the package that defines those targets. This is done by setting the INTERFACE_QT_PACKAGE_NAME and INTERFACE_QT_PACKAGE_VERSION properties on the imported targets. This information allows us to generate appropriate find_dependency() calls in a module's Config file for third party libraries. For example when an application links against QtCore, it should also link against zlib and atomic libraries. In order to do that, the library locations first have to be found by CMake. This is achieved by embedding find_dependency(ZLIB) and find_dependency(Atomic) in Qt5CoreDependencies.cmake which is included by Qt5CoreConfig.cmake. The latter is picked up when an application project contains find_package(Qt5Core), and thus all linking dependencies are resolved. The information 'which package provides which targets' is contained in the python json2cmake conversion script. The generated output of the script contains qt_find_package() calls that represent that information. The Qt5CoreDependencies.cmake file and which which dependencies it contains is generated at the QtPostProcess stop. Note that for non-static Qt builds, we only need to propagate public 3rd party libraries. For static builds, we need all third party libraries. In order for the INTERFACE_QT_PACKAGE_NAME property to be read in any scope, the targets on which the property is set, have to be GLOBAL. Also for applications and other modules to find all required third party libraries, we have to install all our custom Find modules, and make sure they define INTERFACE IMPORTED libraries, and not just IMPORTED libraries. Change-Id: I694d6e32d05b96d5e241df0156fc79d0029426aa Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-161-0/+30
| | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
* Fix sub-architecture (instruction sets / SIMD) handlingAlexandru Croitor2019-03-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In qmake there are at least 2 things to know regarding sub-architectures and instruction sets. Which instruction sets does the compiler know to compile for, represented by the various config.tests and features in qtbase/configure.json. And which instructions sets are enabled by the compiler by default, represented by the configure.json "architecture" test and accessed via QT_CPU_FEATURES.$$arch qmake argument. Before this patch there was some mishandling of the above concepts in CMake code. The former can now be checked in CMake with via TEST_subarch_foo and QT_FEATURE_foo (where foo is sse2, etc). The latter can now be checked by TEST_arch_${TEST_architecture_arch}_subarch_foo (where foo is sse2, etc and the main arch is dynamyicall evaluated). The configurejson2cmake script was adjusted to take care of the above changes, and the cmake files were regenerated as well. Change-Id: Ifbf558242e320cafae50da388eee56fa5de2a50c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate cmake files from configure.json filesAlexandru Croitor2019-03-181-29/+33
| | | | | | | | | The new files represent the json features more closely. This helps with various build issues as well, like dynamicgl feature not being present before. Change-Id: I433592f48e0550700226a635492a3ce15af743c1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Replace QT_FEATURE_shared with BUILD_SHARED_LIBSTobias Hunger2018-11-061-1/+1
| | | | | Change-Id: I7f3efde01a98cd6a25de661624afbf7eda2c57af Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Rerun configurejson2cmake after rebase on top of newer devTobias Hunger2018-11-011-1/+0
| | | | | Change-Id: I1af79e5c87bb17e9145f817d2488c6d24531a2fc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Begin port of qtbase to CMakeSimon Hausmann2018-11-011-0/+421
Done-by: Alexandru Croitor <alexandru.croitor@qt.io> Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-by: Kevin Funk <kevin.funk@kdab.com> Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Done-by: Simon Hausmann <simon.hausmann@qt.io> Done-by: Tobias Hunger <tobias.hunger@qt.io> Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-by: Volker Krause <volker.krause@kdab.com> Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>