summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Silence CMP0083 warnings until we can depend on cmake 3.14Albert Astals Cid2019-01-301-0/+2
| | | | | Change-Id: Idbbe325bf088a68f875ab0e7b2eeb30badf864a7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: Add trivial FindLibproxy.cmakeAlbert Astals Cid2019-01-293-4/+7
| | | | | | | And fix link to it Change-Id: Ie4f29a35a83d19ab83933faf3bcd7d62cffa68b8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: fix build for QtNetwork on macOSLiang Qi2019-01-291-0/+7
| | | | | Change-Id: I32e4550d67e9d72b56de4aafaddec5e2f80792b8 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: pro2cmake.py: Better printing of scopesTobias Hunger2019-01-291-9/+8
| | | | | Change-Id: Ibeb77a23c90d3a47c78d17c4683e4af3c64449fc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: pro2cmake.py: Simplify conditionsTobias Hunger2019-01-293-8/+314
| | | | | | | | | Use pysym to simplify conditions in extend_target. Do some manual changes to the condition based on domain knowledge. Change-Id: I7fbb9ebc93b620a483c6a3a796d84c9bc0e36ef7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: pro2cmake.py: More mappings!Tobias Hunger2019-01-291-0/+7
| | | | | | | Add some more mappings from qmake to CMake equivalents conditions. Change-Id: I57b7bea9d6628e1c2b8d6ae88f799219942b571e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: pro2cmake.py: Work on mapping of conditions to cmakeTobias Hunger2019-01-291-0/+8
| | | | | | | | | | | | Make sure complex things in qmake (e.g. function calls, etc.) are mapped better to cmake. When there is no way to properly map the qmake construct, then make sure to map everything into one identifier. This is to keep the structure of the condition simple. Change-Id: I6d88e0cb85fce1041bbfdc96604dab7bd4e65856 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: pro2cmake.py: Resolve file names for RESOURCESTobias Hunger2019-01-291-1/+1
| | | | | Change-Id: I821cdc88c7f45260997e118ab2abfd7ba6526b75 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: pro2cmake.py: Fix handling of complex else branchesTobias Hunger2019-01-291-2/+3
| | | | | | | | | | | Return the current scope's condition, not the total condition from recursive_evaluate_scope. That is the part the "else" referrs to. The parent_condition stays identical for all branches, so that should not get negated. Change-Id: I0da91483d4d748d01a29ac16890d709d8d659843 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: pro2cmake.py: merge extend_targets with identical conditionsTobias Hunger2019-01-291-14/+62
| | | | | | | | This should somewhat simplify the generated CMakeLists.txt files, especially in complex cases like corelib or network. Change-Id: I208c8f99a64cbb6c97d51dd3ae428bb234982202 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: pro2cmake.py: Fix pyls warningsTobias Hunger2019-01-292-22/+48
| | | | | | | | Fix pyls warnings in pro2cmake.py as well as its tests. Change-Id: Ib8ee1daa9b97735d13c0fde43616daa46de9e171 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Introduce Q_OBJECT qdoc macroTobias Hunger2019-01-259-30/+5
| | | | | | | | | | | | | | | | | | | CMake's moc file scanning is rather primitive: It will run moc on any file containing a line that starts with Q_OBJECT (and similar macros). We have four files in QtBase that contain such a macro at the start of the line in a qdoc comment. These four files were excluded from automatic moc handling by cmake, which is not ideal, since this will silently fail when somebody actually adds a Q_OBJECT macro in code. This patch introduces a macro Q_OBJECT for qdoc. This macro will be replaced with Q_OBJECT in the generated documentation. While not nice, at least a failure to use \Q_OBJECT is noticeable: Moc will warn about the file. Change-Id: I829893c1166eee306fe30058d4ea0256affd45ea Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* CMake: pro2cmake.py: Better output in debug dumpsTobias Hunger2019-01-231-4/+18
| | | | | | | | | Report more error conditions in debug dump and make the output easier to read in the non-error case by wrapping all strings in "". Change-Id: I3c99deda3dfa27dcc0c9ce2800bfb891747e6934 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Give up on faithful representation of -=, +=, *= and =Tobias Hunger2019-01-231-43/+11
| | | | | | | | | | | | | | | Having a good representation is nice, but unfortunately very hard: pro2cmake.py sees just a small part of the entire qmake build system at a time, so the information it has is incomplete to start with. It is not worthwhile to pass the supposedly full information around -- which will then need to get de-duplicated again -- considering that the information is not complete in the first place. So go back to the simplistic approach we used earsier. That is good enough and does not suffer from the problem of having multi-part arguments getting messed up when the scopes get de-duplicated. Change-Id: I553329650d6b8046f7ad8b1282e3d0c961293a28 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Report keys that were not converted in each scopeTobias Hunger2019-01-231-10/+46
| | | | | | | This makes it easier to see what is still missing. Change-Id: I186abd609f20be680ac0943ac89068f764142a79 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Do not print trailing / in directory namesTobias Hunger2019-01-231-0/+1
| | | | | Change-Id: I3da83b8908791e033cf33221631d2fe988f83957 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Do not double-report include filesTobias Hunger2019-01-231-2/+2
| | | | | | | | | Do not add scopes that are going to get merged into their parent scope as a child of the parent scope. This leads to the information of the child scope being duplicated. Change-Id: If4d6a83b9c9eac477959e7774e9cf65fd4df98e6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Better indentation in debug dumpTobias Hunger2019-01-231-2/+2
| | | | | | | | Indent the individual parts of a scope relative to the scope itself. This makes things a bit more readable. Change-Id: Iffbffd69bc960118f9657a1b7fb488da3c7b48dd Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Visit scopes depth-first for include resolutionTobias Hunger2019-01-231-3/+3
| | | | | | | | | | | This avoids some includes being done several times: We used to generate scopes for the include files, add them to our current scope and then traverse the children of the current scope. Switch the order to avoid traversing the newly added scopes twice. Change-Id: Icb9c53c9f54772d3305e0fb121824c23d5469e09 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Ignore 3rdparty code that gets includedTobias Hunger2019-01-231-0/+3
| | | | | | | | | Ignore include files that go into 3rdparty code. Qt 6 should work with external libraries, so there is no need to drag in 3rdparty include directories, etc. Change-Id: I990f3a8a4983e1458843b4122420b9daec763ccb Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Nicer printing of conditionsTobias Hunger2019-01-231-5/+28
| | | | | | | Do not needlessly add () and NOT all over the conditions. Change-Id: If907357306eb3f8ab5b2878bcad5902171a90476 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Improve debugging dumpTobias Hunger2019-01-181-6/+13
| | | | | | | | Make the output of the project structure debug dump more readable. Change-Id: Ib80b41f7fdb8e14ff878284c46f3760d84f4f004 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: pro2cmake: Fix printing of the different operationsTobias Hunger2019-01-181-6/+6
| | | | | | Change-Id: Ieb33141601c29ec2f3c30c6725179f1fb234e53a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: pro2cmake.py: Fix merging of scopesTobias Hunger2019-01-181-1/+4
| | | | | | | | | Set new keys in the parent scope instead of just appending to existing scopes. Change-Id: I901c3f418429d8aed56acb39b1dbe566c5468920 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Fix include path handling in pro2cmake.pyTobias Hunger2019-01-181-2/+1
| | | | | | Change-Id: Ice9db97db5bf1fb347bff07bcaf91daac87fa983 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: pro2cmake: fix include file handlingTobias Hunger2019-01-181-1/+8
| | | | | | | | Do not include the same file over and over again... Change-Id: Ia0748b9ebe58388549ba23ec7e24ce3d9b738987 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Add "BUILD_EXAMPLES" option to disable examplesTobias Hunger2019-01-171-1/+5
| | | | | | | | | BUILD_EXAMPLES defaults to "ON". Change-Id: I5dfe926d8a23b610b45a5243deeb82483d998b90 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
* CMake: Store Qt features in CMake CacheTobias Hunger2019-01-1710-108/+34
| | | | | | | | | | This is less self-contained than what we have, but significantly speeds up cmake configure/generate runs. This patch also warns when a feature is already defined. Change-Id: I8cab63e208ba98756b47d362a39b462f5ec55e20 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: QtFeature optimizationTobias Hunger2019-01-171-2/+0
| | | | | | | Remove some unnecessary sorting, speeding up cmake by about 10s on my machine Change-Id: Ieafbd16f6dd8cfe6d1af3c739bfe58e8bf724441 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Error out on mis-use of qt_pull_features_into_current_scopeTobias Hunger2019-01-171-1/+4
| | | | | | | Make it a bit harder to mis-use qt_pull_features_into_current_scope. Change-Id: I2a6be28d7c0e6207217cb1908ec22cc757acd01a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Introduce Qt::GlobalConfig to hold the global featuresTobias Hunger2019-01-175-39/+42
| | | | | | | | This simplifies the handling of features a bit as it removes the special code to store two sets of features in Qt::Core. Change-Id: I536d41cfc76a02af054e3cfbad6bda50b1e9e49a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Check for visibility onceTobias Hunger2019-01-161-5/+6
| | | | | Change-Id: I5c729f4509eed16409df5eb048afb7f60c5ca57c Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: update README.mdLiang Qi2019-01-161-2/+3
| | | | | | | Because AUTOMOC/AUTOUIC/AUTORCC got merged into master. Change-Id: I0ddfd4443a9892fae1dca54d75b97af4c69ad7ef Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: Remove one unnecessary feature push into parent scopeTobias Hunger2019-01-141-2/+0
| | | | | | | | During qt_feature_begin_module no features are changed, so there is no need to push features. Change-Id: Id7ebcfad373caa284e790b7eb0a178eaa72216e5 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: Use WrapRt instead of rtMikhail Svetkin2019-01-091-2/+1
| | | | | Change-Id: I98f50a5ee7c3f1707589214df816ed03e0cfa249 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* pro2cmake: Clean up linter and pypi issuesTobias Hunger2019-01-071-128/+230
| | | | | | | Also remove one stray line of debug output Change-Id: If3d2e0b31e5e1b1c05c321d63e8762b23f55bb66 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* pro2cmake: Be more faithful in the representation of operationsTobias Hunger2018-12-211-92/+146
| | | | | | | Do a better approximation of =, +=, *= and -=. Change-Id: I94765532f278deaac330b27cd5a3f41f319c6477 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* pro2cmake: Handle VPATHTobias Hunger2018-12-211-3/+17
| | | | | Change-Id: Ia72f55489129c50ca730c42b75bbc2bda926b82f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Build PrintSupport module and testsTobias Hunger2018-12-149-0/+222
| | | | | Change-Id: I7ac14f5214619f547af7221d213ac7e338a05bfc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Use AUTOMOC/AUTOUIC/AUTORCCTobias Hunger2018-12-1426-1025/+100
| | | | | Change-Id: I0235ca4f227623e5937348b4b010637921dbf154 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Get rid of useless underscores in QtFeature.cmakeTobias Hunger2018-12-141-102/+101
| | | | | Change-Id: I87eb55ed2ce01ab136dac3e2a587b43bd3f8a98e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: SimplifyTobias Hunger2018-12-144-98/+61
| | | | | | | | | | | * Only import features once * Move Core specific code into its CMakeLists.txt file * More consistently use target names like "Core" to refer to "Qt modules". We tend to require either "Core" or "QtCore" in places, which I find confusing. Change-Id: Id54161bc5468412750cb9eb7eeb15de3812e8a09 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Merge qt_internal_module_include_dir and qt_internal_module_infoTobias Hunger2018-12-144-51/+48
| | | | | | | | | ... and fix the fallout of this change. It results in more targets being passed overall (instead of a strange mix of targets and module names), so this is a good thing(TM). Change-Id: I1c4326b80e2c6675356587879ec8471ef7249a50 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Unify creation of target aliasesTobias Hunger2018-12-141-11/+23
| | | | | | | | For Qt6 we want to have Qt6::foo and Qt::foo. Enable that consistently. Change-Id: I3cf05c4171b13029bf508d307945e8be4687e86b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* CMake: Refactor qt module name related codeTobias Hunger2018-12-141-22/+33
| | | | | Change-Id: Ib14c030ef6d2e988aaaebca354cf1a6881e05e25 Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* Prefer qt_internal_ over _qt_ for internal functionsTobias Hunger2018-12-141-3/+2
| | | | | | Change-Id: Idb6f3d8f29890bb4d8f0d1d644c0d1103342946a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
* CMake: Unify on variable names without _ in functionsTobias Hunger2018-12-141-141/+140
| | | | | | Change-Id: I28883775d8f9bd718de477c03628b291972f4590 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
* CMake: Do less feature-pushingTobias Hunger2018-11-221-2/+7
| | | | | | | | | | Do not try to push features up into the parent scope if none were added. This avoids a lot of iterations over all defined variables. Change-Id: Idb9a4c86643c0ca773584a05b3a0590cfab7514d Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: Simplify registration of known Qt targetsTobias Hunger2018-11-221-4/+6
| | | | | Change-Id: Ibd7b5f628c0a1a3087bdfebb0c35242b42c5e938 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: Add simple test for moc handling and fix the implementationTobias Hunger2018-11-227-64/+88
| | | | | | | | Add a simple test for moc-file handling and fix the implementation to make the test pass. Change-Id: I34e8d65a5e01a6f557d3a3d8cb262fd147ad78e4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>