Commit Graph

35 Commits

Author SHA1 Message Date
Stephen Kelly 59a729b2be QtAutogen: Split initializer class into separate file. 2015-09-29 09:56:23 -04:00
Stephen Kelly 1e83a963d8 QtAutogen: Split initializer methods into separate class. 2015-09-26 19:32:54 +02:00
Stephen Kelly c3c20d3ce3 QtAutogen: Add _automoc.cpp sources before initializing. 2015-09-26 19:32:53 +02:00
Stephen Kelly 8b6ec29d40 QtAutogen: Move initialization condition to caller. 2015-09-26 19:32:53 +02:00
Stephen Kelly e791c85419 QtAutogen: Make some methods static. 2015-09-26 19:32:52 +02:00
Stephen Kelly 6210ec644a QtAutogen: Make internal method private. 2015-09-26 19:32:52 +02:00
Stephen Kelly a3ceb998d7 QtAutogen: Don't use members to initialize automoc targets. 2015-09-26 19:32:50 +02:00
Stephen Kelly f9a77e76e4 QtAutogen: Don't use a member to store skipped uic files. 2015-09-26 18:48:23 +02:00
Stephen Kelly c3633e7a41 QtAutogen: Add missing includes and forward declarations. 2015-09-26 18:48:23 +02:00
Stephen Kelly 496f4cd07d cmGlobalGenerator: Create cmGeneratorTargets before QtAutomoc.
Add cmGeneratorTargets as needed in the QtAutomoc processing.
2015-07-27 21:58:49 +02:00
Stephen Kelly b661d6c631 cmQtAutoGenerators: Re-arrange data layout.
Size goes from 920 to 912 bytes.
2015-06-07 10:24:28 +02:00
Stephen Kelly af65da0aa9 cmStandardIncludes: Remove list include.
Include it only where used.
2015-02-06 19:04:53 +01:00
Stephen Kelly 6e1c359fe9 QtAutogen: Regenerate qrc files if their input changes (#15074)
Get dependencies from the output of ``rcc --list`` if using
Qt 5.  Otherwise process the file in the same way as the
qt4_add_resources macro.

This does not work for RCC files which are generated.

The cmake_autogen build step is implemented as a PRE_BUILD step
of the target currently if possible, rather than a standalone
custom target.  This is to keep the number of (synthesized)
custom targets that appear in the UI low, but in some cases
it is necessary to fall back to a full custom target.

Fall back to a full custom target for the VS builds if autorcc
is used.
2014-10-24 19:45:27 +02:00
Stephen Kelly a29953180c QtAutogen: Expand rccfiles into a vector early in the autogen process.
This can be re-used as a vector.
2014-10-23 20:35:26 +02:00
Stephen Kelly 506151af51 QtAutogen: Extract a GetRccExecutable method. 2014-10-23 20:35:25 +02:00
Brad King e6f0bb7b15 Merge topic 'autogen-fixes'
e3c97a19 QtAutogen: Process all ui files in a source file (#14981).
b8877b1d QtAutogen: Add source files to target when only AUTORCC is used.
2014-09-22 09:13:01 -04:00
Stephen Kelly e3c97a1914 QtAutogen: Process all ui files in a source file (#14981).
Use a vector to store a list of matched ui_ includes, instead of
overwriting the previous match.
2014-09-18 09:41:16 +02:00
Stephen Kelly 33774ca201 QtAutogen: Put generated qrc files in a target-specific dir. 2014-04-18 16:41:13 +02:00
Brad King edb506b862 Merge topic 'fix-Qt-Autogen'
71a11252 QtAutogen: Fix use of multiple ui files in a single target.
261acd91 QtAutogen: Use the basename for resource files.
2014-03-26 13:24:43 -04:00
Stephen Kelly 71a11252e9 QtAutogen: Fix use of multiple ui files in a single target.
Don't store a mapping of the directory to the ui file. The directory
will be a unique key, allowing only one ui file to be specified.
Use the source file name instead as the mapping key.
2014-03-25 01:39:03 +01:00
Ben Boeckel 24b5e93de2 stringapi: Use strings for directories 2014-03-08 13:05:38 -05:00
Ben Boeckel 84fdc9921c stringapi: Pass configuration names as strings 2014-03-08 13:05:36 -05:00
Stephen Kelly 6053ce22f6 QtAutogen: Make uic work even when the source is in a subdir.
Modify the includedUis to store the path to the file which includes
the ui file. Reuse that path to generate the output file from the
uic process.
2014-02-04 13:21:43 -05:00
Stephen Kelly 4b989d5f15 QtAutogen: Separate source file processing from AUTOMOC.
This will allow using AUTOUIC without using AUTOMOC for example.
2014-01-28 21:04:40 +01:00
Stephen Kelly c48d877d31 QtAutogen: Make some methods appropriately file-static. 2014-01-28 21:04:11 +01:00
Stephen Kelly c62cd3e2ae Constify autogen handling. 2013-12-11 15:30:12 +01:00
Stephen Kelly 035b690882 Autogen: Split AutoRcc handling into two methods
The initialize method changes the target, whereas the setup method
does not.
2013-12-11 15:30:12 +01:00
Stephen Kelly 98093c45db QtAutoUic: Add INTERFACE_AUTOUIC_OPTIONS target property.
Transitively consume the property from linked dependents.

Implement configuration-specific support by following the pattern
set out for compile definitions and includes in cmQtAutoGenerators.

Implement support for origin-tracking with CMAKE_DEBUG_TARGET_PROPERTIES.

This is motivated by the needs of KDE, which provides a separate
translation system based on gettext instead of the Qt linguist
translation system. The Qt uic tool provides command line options
for configuring the method used to translate text, and to add an
include directive to the generated file to provide the method.

 http://thread.gmane.org/gmane.comp.kde.devel.frameworks/7930/focus=7992

Implement the interface to provide the uic options as a usage-requirement
on the KI18n target, as designed for KDE.
2013-11-27 19:06:12 +01:00
Stephen Kelly d2f4b1e3cf cmAutogen: Rename method to InitializeAutogenTarget
This reflects better what it is doing.
2013-11-05 20:17:34 +01:00
Stephen Kelly 9c87d9cc3e Add automatic rcc invocation for Qt.
This replaces the need to invoke qt4_add_resources by allowing
adding the source .qrc file directly to the target sources.
2013-10-24 12:30:41 +02:00
Stephen Kelly 84218e1870 Add automatic uic invocation for Qt.
The source files are already processed by cmQtAutomoc to look for
moc includes, so extend that to also look for ui_ includes and
find corresponding .ui files to process.

This replaces the need to invoke qt4_wrap_ui().

As the ui files are not likely to be part of the SOURCES of the
target, store the options associated with them separately in the
cmMakefile for querying during the autogen run.
2013-10-24 12:30:38 +02:00
Stephen Kelly f371ab5803 Rename RunAutomoc to RunAutogen.
It will soon be used to process ui and rcc files too.
2013-10-24 11:50:58 +02:00
Stephen Kelly 85b3d6e73d Extract an SetupAutoMocTarget method.
This class will soon gain methods for autouic and autorcc.
2013-10-24 11:50:58 +02:00
Stephen Kelly 97f1aa39da Rename method to reflect generic use. 2013-10-24 09:14:13 +02:00
Stephen Kelly 5c058c8f12 Rename the cmQtAutomoc class to cmQtAutoGenerators.
It will be extended to process .ui and .qrc files too.
2013-10-24 09:14:12 +02:00