summaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* cmake: find gtk3 and build the gtk3 platformthemeAlbert Astals Cid2019-02-111-0/+1
| | | | | Change-Id: I7db7321a2fd5ea0eda1924f3dece3b1c86d87d10 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: pro2cmake.py: Simplify condition generationTobias Hunger2019-02-111-18/+2
| | | | | | | | There is no need to try and avoid extra () and NOTs: Those will be removed by sympy later anyway. Change-Id: I39d3e4d1d829579e532bfbbf6c69e0f1e06e9a22 Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* cmake: Find tslib and build the tslib plugin if foundAlbert Astals Cid2019-02-111-0/+1
| | | | | Change-Id: I7119ddf473a3ede29bbfef23cffb08a4fcbd5681 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: pro2cmake.py: Treat ANDROID_EMBEDDED as ANDROIDTobias Hunger2019-02-111-0/+1
| | | | | | | Treat ANDROID_EMBEDDED as ANDROID when simplifying conditions. Change-Id: I2cf0ea1e1a3e882e3a7b7276867dcee452866ade Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* CMake: pro2cmake.py: Do not go into infinite loopTobias Hunger2019-02-111-7/+14
| | | | | | | Do not go into an infinite loop when replacing a variable with itself. Change-Id: I2765b1c0c567753f26ca75e0533c1d193362b456 Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* CMake: helper.py: Map harfbuzz libraryTobias Hunger2019-02-111-0/+1
| | | | | Change-Id: I71daa9acf391c70c6cba99609c1f67ca5eeaa220 Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* CMake: pro2cmake.py: Handle equals(foo, bar) in conditionsTobias Hunger2019-02-111-0/+2
| | | | | | | | This adds an overly simplistic mapping -- just like it does for the rest of the qmake test functions. Change-Id: I0c9e3b70c1c3d0c68a245706a141aa7b7cb4d8bf Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* CMake: pro2cmake.py: Expand qmake values in file names, etc.Tobias Hunger2019-02-111-19/+45
| | | | | | | | | | | | | | | Expand qmake values when dealing with source file names, include directories and more. This handles cases where variables are used to refer to sources (e.g. $$VERSIONTAGGING_SOURCES in corelib) as well as things like $$QT_SOURCE_TREE and friends. Note that $$PWD and $$OUT_PWD are still need hand-holding since they refer to the scopes directory relative to the top level directory -- which pro2cmake.py does not know. Change-Id: I011ef55416ff820053d5f844b3008836849f5075 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Better mapping of complex conditionsTobias Hunger2019-02-111-5/+5
| | | | | | | | | | | | .pro-files support things like contains(Foo, bar), etc. Map that in such a way that only one identifier will be visible to CMake to unconfuse the logic handling on that side. These conditions will need manual fixup later! Change-Id: Id4946e694a9adccf9f54bcce26a6c227cd921007 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Remove some dead codeTobias Hunger2019-02-111-15/+0
| | | | | Change-Id: I8e3e7e4c4ef9747e0749734bdf875baccc4646bd Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* CMake: pro2cmake.py: Remove leading ./ in pathsTobias Hunger2019-02-111-1/+3
| | | | | | | | Remove leading './' from paths before writing them into CMakeLists.txt. Change-Id: I5680a3470cf491a8805b559197f94f8e6a6ce9b7 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake: Fix handling of chained scopes with else branchesTobias Hunger2019-02-111-1/+28
| | | | | | | | | | | | | | | | Fix handling of things like: foo:bar:buz: { do something } else: wat { do something else } The else relates to foo AND bar AND buz, not just to buz in this case. Change-Id: I40d1fa295b4d6dd95ae5e1ce2d58372edc807b86 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: Map dlopen feature to 'ON'Tobias Hunger2019-02-112-1/+3
| | | | | | | | | | | | Map the dlopen feature to 'ON'. The effect is that cmake will figure out whether or not linking to 'dl' is necessary or not. The user-visible feature is 'library' anyway: That enables dynamic library loading -- and will link in 'dl' as needed. Change-Id: I0d68275a7234efba7f926150f120bb37b4a1163f Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Add XCB and X11 librariesTobias Hunger2019-02-111-2/+22
| | | | | | | | Add all the XCB and X11 libraries needed for the XCB plugin. Change-Id: I772b99c68521cd46cbba736912c8d8594d9d2ad8 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Small fix to type markupTobias Hunger2019-01-311-1/+1
| | | | | Change-Id: I2f7dc94f379d51c3816649849aa7365b17334ab5 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Add scope debugging supportTobias Hunger2019-01-311-0/+8
| | | | | | | | Dump scope trees for all scopes that contain a variable 'PRO2CMAKE_SCOPE_DEBUG' (set to any value). Change-Id: If17bb1697a32ccaa427a858c2330ab2b019d0fa8 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Assign a unique id to each scopeTobias Hunger2019-01-311-2/+7
| | | | | | | This makes scopes much simpler to destinguish from each other. Change-Id: I1af42f181b5899aba749bcf9267a345385149f90 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: report total condition when dumping a scopeTobias Hunger2019-01-311-0/+2
| | | | | | | Show the total_condition (if set) when dumping a scope. Change-Id: I9dfe98c2251f1d28881771042f17d723cedc8907 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Add a way to debug merges of scopesTobias Hunger2019-01-311-2/+20
| | | | | | | | Generate debug output whenever a qmake scope with a variable 'PRO2CMAKE_MERGE_DEBUG' is involved in a scope merge. Change-Id: I0ad94b881db9930de689c199adbac084efe6c03b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Handle more librariesTobias Hunger2019-01-311-1/+9
| | | | | Change-Id: I561b619c4dbc56a1f6ad383a68ce4b82858a031c Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Add FindZSTD.cmake and wire it up in configurejson2cmake.pyTobias Hunger2019-01-311-0/+1
| | | | | | | Zstd is used in the dev branch, so prepare for it. Change-Id: I130d98e3888a1eb4c7444728fc5088c5dae9d911 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: Use FindGLIB2 from cmake-extra-modulesTobias Hunger2019-01-312-2/+3
| | | | | | | Use FindGLIB2 from cmake-extra-modules over hand-rolled own version. Change-Id: I1f8e055bc12dd728c033fd88480690643d90159a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: pro2cmake.py: Pass QMAKE_MOC_OPTIONS on to CMakeTobias Hunger2019-01-311-0/+6
| | | | | Change-Id: I39c1b0aedbffaa29a34253e0c1c4bb4a4dddbe98 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* CMake: pro2cmake.py: Convert more settings from .pro-file to CMakeTobias Hunger2019-01-311-1/+13
| | | | | | | Convert QMAKE_USE, QMAKE_CXX_FLAGS and QMAKE_LFLAGS into CMake. Change-Id: I53a5b91664b6ab71892d4381c00f8d744d7d7abd Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* CMake: pro2cmake.py: Use propertiesTobias Hunger2019-01-312-71/+85
| | | | | | | Make use of @property to make code a bit nicer. Change-Id: Iff0bfed57874cf13b7e5f85acde2660a397933d7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: pro2cmake: default QT_FEATURE_system_* to "ON"Tobias Hunger2019-01-311-1/+6
| | | | | | | | | Qt 6 will use external libraries for everything, so default all QT_FEATURE_system_foo to "ON". Change-Id: I884a4293c64487271be08de5fab82e6858d0a2ed Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: pro2cmake.py: Merge more scopesTobias Hunger2019-01-312-40/+328
| | | | | | | | | | | * Remove scopes with condition 'OFF' * Merge scopes with identical conditions This e.g. merges children with a condition that simplifies to 'ON' with their parent scope. Change-Id: Ieb3d60e1234f189ac45869853555ca8c0cfb5c76 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: configure2cmake.py: Handle Libproxy and corewlanTobias Hunger2019-01-301-1/+2
| | | | | | | Update to cover more libraries Change-Id: I32a26b0fa0a79531fcb55e7a4646a2e63fec1d5b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@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: 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>