This way you can run cmake, go directly into src/widgets
and it will build moc and rcc before QtCore (because they are needed
there) and uic before QtWidgets but not before QtCore because
it's not used there.
Without this it would get stuck creating the mocs since cmake
is not expecting the moc executable to just not be there
Change-Id: Ibcb6057bfab7a4bf823544e8f7bd128ea93d1986
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
And by "valid" i mean if it returns the double-conversion::double-conversion
target that we are going to use later. Fedora rawhide has a
doubleconversion cmake config file but it doesn't define any target
Change-Id: Ib0360bc9fdf593a14510c9a2d59b47b32bc4b356
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
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>
This makes scopes much simpler to destinguish from each other.
Change-Id: I1af42f181b5899aba749bcf9267a345385149f90
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Show the total_condition (if set) when dumping a scope.
Change-Id: I9dfe98c2251f1d28881771042f17d723cedc8907
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
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>
This makes testing for Qt with namespace builds easier in extend_target.
Change-Id: I58ab985a2ed39859fb65d35f8f69065fed2a5c9b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Zstd is used in the dev branch, so prepare for it.
Change-Id: I130d98e3888a1eb4c7444728fc5088c5dae9d911
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Use FindGLIB2 from cmake-extra-modules over hand-rolled own version.
Change-Id: I1f8e055bc12dd728c033fd88480690643d90159a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Enable a flag so that cmake documents which extend_target calls it
acts upon and which ones are skipped.
Change-Id: I1e2d4da47b93d6b5d7b7ec25b7bc6341f38b3dca
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Convert QMAKE_USE, QMAKE_CXX_FLAGS and QMAKE_LFLAGS into CMake.
Change-Id: I53a5b91664b6ab71892d4381c00f8d744d7d7abd
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Make use of @property to make code a bit nicer.
Change-Id: Iff0bfed57874cf13b7e5f85acde2660a397933d7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
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>
* 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>
Since the code wants pinger_interface.h as include
name and the qt_create_qdbusxml2cpp_command function was
using the filename as source for the next filename i introduced
a new option DBUS_ADAPTOR_BASENAME/DBUS_INTERFACE_BASENAME to set the
name of the resulting file
Change-Id: I582d578b68275e4530e91a88631ae43fd1ae06fd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
It isn't being built in the current qmake build either (maybe because it
doesn't build because uses sleep())
Change-Id: Ie97287c6e45d1fcc32063bd9eb37ff2907dfa891
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
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>
Add some more mappings from qmake to CMake equivalents conditions.
Change-Id: I57b7bea9d6628e1c2b8d6ae88f799219942b571e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
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>
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>
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>
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'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>
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>
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>
This makes it easier to see what is still missing.
Change-Id: I186abd609f20be680ac0943ac89068f764142a79
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
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>
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>