diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-01-17 18:32:12 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:13:52 -0300 |
commit | 129fec17214087e809736f53eff5ce21b02fa2ca (patch) | |
tree | d0f90fc93a3c4841e722788a9815b7387416b18c /generator/main.cpp | |
parent | fe044247d153725db1f3060f30f53f7e6c1e4381 (diff) |
Shiboken binary now responds to the "--version" argument.
The version command line argument was previously answered by GeneratorRunner.
This commit also generally updates some CMake files.
Diffstat (limited to 'generator/main.cpp')
-rw-r--r-- | generator/main.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/generator/main.cpp b/generator/main.cpp index b2f2d37ec..8545bcc9a 100644 --- a/generator/main.cpp +++ b/generator/main.cpp @@ -21,14 +21,22 @@ * */ +#include "shibokenconfig.h" +#include <iostream> #include <QtCore> -int main(int argc, char *argv[]) +int main(int argc, char* argv[]) { QStringList args; args.append("--generator-set=shiboken"); - for (int i = 1; i < argc; i++) + for (int i = 1; i < argc; i++) { + if (QString("--version") == argv[i]) { + std::cout << "shiboken v" SHIBOKEN_VERSION << std::endl; + std::cout << "Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies)" << std::endl; + return EXIT_SUCCESS; + } args.append(argv[i]); - return QProcess::execute("generatorrunner", args); + } + return QProcess::execute(GENERATOR_BINARY, args); } |