summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerators.cxx
Commit message (Collapse)AuthorAgeFilesLines
* QtAutogen: Only add source files to the target if AUTORCC is ON.Stephen Kelly2014-02-051-12/+16
| | | | | | | | | | | | The qtx_add_resources() macro adds the resource file to the output list to maintain file-level dependencies. Having the qrc file in a target sources is a precondition for AUTORCC to function. When processing the source files of a target, only add the generated qrc_<file>.cpp to the target sources if AUTORCC is ON. This avoids pre-porting conflict with the macro. Reported-by: Micha Hergarden
* QtAutogen: Make uic work even when the source is in a subdir.Stephen Kelly2014-02-041-14/+20
| | | | | | 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.
* QtAutogen: Short-circut some logic when moc is not available.Stephen Kelly2014-01-281-3/+14
| | | | | This is the case when AUTOMOC is false. This prevents creating rules to moc the files in the absense of moc.
* QtAutogen: Separate source file processing from AUTOMOC.Stephen Kelly2014-01-281-93/+71
| | | | This will allow using AUTOUIC without using AUTOMOC for example.
* QtAutogen: Make some methods appropriately file-static.Stephen Kelly2014-01-281-34/+31
|
* QtAutogen: Fix autouic target options in the presence of a config.Stephen Kelly2014-01-281-1/+5
| | | | Read the correct variable. Add scopes to prevent escape of variables.
* QtAutogen: Remove unused variables.Stephen Kelly2014-01-281-2/+0
|
* QtAutogen: Remove read of SKIP_AUTOUIC target property.Stephen Kelly2014-01-281-7/+1
| | | | | Skipping AUTOUIC for a target is achieved by setting the AUTOUIC target property go OFF.
* QtAutogen: Use Qt 4 IMPORTED targets to find executable locations.Stephen Kelly2014-01-281-22/+36
| | | | | | | | | | | | Avoid using the moc from Qt 5 with Qt 4 based targets. Moc generates a version check to ensure that such generated code does not compile. The Qt4And5Automoc unit test should have been testing this, but it was not because the test was broken. In that unit test, moc was run on trivial files which have no significant content, and in particular no Q_OBJECT macro. Therefore moc was generating empty files which do not even contain the version check. Fix this by generating files for input to moc at cmake time.
* cmTarget: Make GetSourceFiles populate an out-vector parameter.Stephen Kelly2014-01-091-4/+8
| | | | | In a future patch, this will also be populated with extra sources from the linked dependencies.
* Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.Clinton Stimpson2014-01-071-2/+3
| | | | | Also use SystemTools::Fopen() instead of fopen(). This is to eventually support utf-8 filenames.
* QtAutogen: Don't modify target source files while iterating them.Stephen Kelly2013-12-201-1/+10
| | | | | | | Populate a separate vector of files and append them separately. This was the pattern used prior to commit 035b6908 (Autogen: Split AutoRcc handling into two methods, 2013-12-10), which was erroneously not maintained in that refactoring.
* Automoc: Fix styleStephen Kelly2013-12-191-3/+3
| | | | Insert whitespace before operators.
* Constify autogen handling.Stephen Kelly2013-12-111-10/+12
|
* Autogen: Split AutoRcc handling into two methodsStephen Kelly2013-12-111-20/+36
| | | | | The initialize method changes the target, whereas the setup method does not.
* QtAutoUic: Add INTERFACE_AUTOUIC_OPTIONS target property.Stephen Kelly2013-11-271-8/+69
| | | | | | | | | | | | | | | | | | | | 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.
* QtAutoUic: Handle new -include command line parameter.Stephen Kelly2013-11-271-0/+1
|
* QtAutogen: Use config without prefix in map key.Stephen Kelly2013-11-271-2/+2
| | | | | This is used by IDE generators to select config-specific includes and defines.
* cmQtAutogen: Allow specifying depends for autogen targets.Stephen Kelly2013-11-251-0/+5
| | | | | Test this by generating files with a custom target, which moc requires to be present when it is run.
* cmTarget: Make custom command accessors API const.Stephen Kelly2013-11-191-1/+1
| | | | Add specific mutators instead of providing non-const refs.
* cmAutogen: Rename method to InitializeAutogenTargetStephen Kelly2013-11-051-1/+1
| | | | This reflects better what it is doing.
* cmAutogen: Move autogen target creation to InitializeMocSourceFile.Stephen Kelly2013-11-051-67/+72
| | | | | | The SetupAutoGenerateTarget method will soon be invoked at a later time in a followup commit. We need to ensure that we create the utility autogen target early.
* cmAutogen: Extract some helper methods for autogen targets.Stephen Kelly2013-11-051-9/+21
| | | | These snippets will soon be needed from multiple methods.
* Add automatic rcc invocation for Qt.Stephen Kelly2013-10-241-0/+283
| | | | | This replaces the need to invoke qt4_add_resources by allowing adding the source .qrc file directly to the target sources.
* Add automatic uic invocation for Qt.Stephen Kelly2013-10-241-10/+381
| | | | | | | | | | | | 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.
* Record which files are skipped by automoc.Stephen Kelly2013-10-241-12/+26
| | | | They may not be skipped by autouic.
* Add extra checks for the AUTOMOC target property.Stephen Kelly2013-10-241-14/+21
| | | | In an upcoming commit, this class will be used even if it is not set.
* Update output messages for generic use.Stephen Kelly2013-10-241-14/+14
|
* Rename RunAutomoc to RunAutogen.Stephen Kelly2013-10-241-2/+2
| | | | It will soon be used to process ui and rcc files too.
* Extract an SetupAutoMocTarget method.Stephen Kelly2013-10-241-48/+56
| | | | This class will soon gain methods for autouic and autorcc.
* Rename the AutomocInfo.cmake file to be more generic.Stephen Kelly2013-10-241-3/+3
|
* Move some makefile definitions up away from moc-specific code.Stephen Kelly2013-10-241-22/+21
|
* Add the AUTOGEN_TARGETS_FOLDER and obsolete AUTOMOC_TARGETS_FOLDER.Stephen Kelly2013-10-241-3/+8
|
* Rename some variables to reflect broader scope.Stephen Kelly2013-10-241-8/+9
|
* Rename method to reflect generic use.Stephen Kelly2013-10-241-2/+2
|
* Rename local variable to reflect generic use.Stephen Kelly2013-10-241-8/+8
|
* Move variable set to where it is used.Stephen Kelly2013-10-241-2/+1
|
* Rename the cmake_automoc command to cmake_autogen.Stephen Kelly2013-10-241-1/+1
| | | | | | There is no need for a "cmake_automoc" backward compatibility command because it is internal, undocumented, and only executed from a matching version of cmake.
* Rename the cmQtAutomoc class to cmQtAutoGenerators.Stephen Kelly2013-10-241-0/+1321
It will be extended to process .ui and .qrc files too.