diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-11-16 08:59:03 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-11-19 11:51:30 (GMT) |
commit | b2a0b549bb9fea678517a52caf333eae009901dd (patch) | |
tree | a19e2b6ed59897a505f5e2b8caaddeed3de4dcf8 /Source/cmcmd.cxx | |
parent | 85ae0ba796c26b9ba2f7025e267d3f438db388c6 (diff) | |
download | CMake-b2a0b549bb9fea678517a52caf333eae009901dd.zip CMake-b2a0b549bb9fea678517a52caf333eae009901dd.tar.gz CMake-b2a0b549bb9fea678517a52caf333eae009901dd.tar.bz2 |
Autogen: Introduce standalone RCC generator class
Introduces the standalone RCC generator class `cmQtAutoGeneratorRcc`.
Every instance of `cmQtAutoGeneratorRcc` class handles the
`rcc` invocation for a single `.qrc` file.
The class will be used in the future to allow parallel `.qrc` file
processing by calling `cmake -E cmake_autorcc <INFO_FILE> <CONFIG>`.
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 449db9d..a37bc3c 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -6,6 +6,7 @@ #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmQtAutoGeneratorRcc.h" #include "cmQtAutoGenerators.h" #include "cmStateDirectory.h" #include "cmStateSnapshot.h" @@ -992,11 +993,20 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) } #ifdef CMAKE_BUILD_WITH_CMAKE - if (args[1] == "cmake_autogen" && args.size() >= 4) { - cmQtAutoGenerators autogen; + if ((args[1] == "cmake_autogen") && (args.size() >= 4)) { + cmQtAutoGenerators autoGen; + std::string const& infoDir = args[2]; std::string const& config = args[3]; - bool autogenSuccess = autogen.Run(args[2], config); - return autogenSuccess ? 0 : 1; + return autoGen.Run(infoDir, config) ? 0 : 1; + } + if ((args[1] == "cmake_autorcc") && (args.size() >= 3)) { + cmQtAutoGeneratorRcc autoGen; + std::string const& infoFile = args[2]; + std::string config; + if (args.size() > 3) { + config = args[3]; + }; + return autoGen.Run(infoFile, config) ? 0 : 1; } #endif |