summaryrefslogtreecommitdiffstats
path: root/generator/main.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-01-17 18:32:12 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-01-31 14:47:48 -0300
commit4c682d6121b5fa31c54655cb119d75e39d957ce1 (patch)
treedcf679f92c15b972bc9bcf026fdc0c43fbd98bc8 /generator/main.cpp
parentcf352ecf7f7414f57ee84fc020b5a27e6d021917 (diff)
downloadshiboken-4c682d6121b5fa31c54655cb119d75e39d957ce1.tar.gz
shiboken-4c682d6121b5fa31c54655cb119d75e39d957ce1.tar.xz
shiboken-4c682d6121b5fa31c54655cb119d75e39d957ce1.zip
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.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/generator/main.cpp b/generator/main.cpp
index b2f2d37e..8545bcc9 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);
}