summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-09-03 19:29:54 -0300
committerHugo Lima <hugo.lima@openbossa.org>2009-09-03 19:29:54 -0300
commit74ad15b93b2c3816850acb702c669be8ce0fc4ab (patch)
treef98962c959afdbb7b0b6b02abc38098b62886bf6
parent518028765c892b7a6a840cca92376ccc8b77b04c (diff)
downloadgeneratorrunner-74ad15b93b2c3816850acb702c669be8ce0fc4ab.tar.gz
generatorrunner-74ad15b93b2c3816850acb702c669be8ce0fc4ab.tar.xz
generatorrunner-74ad15b93b2c3816850acb702c669be8ce0fc4ab.zip
- Merged boostpythongeneratorversion.h.in and generator_plugin_dir.h.in
into generatorrunnerconfig.h - Added some variables to FindGeneratorRunner.cmake * GENERATORRUNNER_PLUGIN_DIR The dir where the generator plugins should be installed. * GENERATORRUNNER_VERSION The generatorrunner current version.
-rw-r--r--CMakeLists.txt8
-rw-r--r--FindGeneratorRunner.cmake.in4
-rw-r--r--boostpythongeneratorversion.h.in4
-rw-r--r--generator_plugin_dir.h.in4
-rw-r--r--generatorrunnerconfig.h.in10
-rw-r--r--main.cpp7
6 files changed, 17 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8287980..fdf3c58 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,11 +19,7 @@ set(generator_plugin_DIR ${LIB_INSTALL_DIR}/generatorrunner)
add_definitions(${QT_DEFINITIONS})
-set(boostpythongenerator_VERSION ${generator_VERSION})
-configure_file(boostpythongeneratorversion.h.in ${CMAKE_CURRENT_BINARY_DIR}/boostpythongeneratorversion.h @ONLY)
-
-# TODO Install it.
-configure_file(generator_plugin_dir.h.in ${CMAKE_CURRENT_BINARY_DIR}/generator_plugin_dir.h @ONLY)
+configure_file(generatorrunnerconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/generatorrunnerconfig.h @ONLY)
set(CMAKE_BUILD_TYPE Debug)
@@ -59,7 +55,7 @@ add_custom_target(uninstall "${CMAKE_COMMAND}"
-set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${boostpythongenerator_VERSION})
+set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${generator_VERSION})
add_custom_target(dist
COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD
| bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
diff --git a/FindGeneratorRunner.cmake.in b/FindGeneratorRunner.cmake.in
index c6a431b..9d2aa08 100644
--- a/FindGeneratorRunner.cmake.in
+++ b/FindGeneratorRunner.cmake.in
@@ -10,6 +10,6 @@ FIND_LIBRARY(GENERATORRUNNER_LIBRARY genrunner @CMAKE_INSTALL_PREFIX@/lib)
SET(GENERATORRUNNER_FOUND "NO")
IF(GENERATORRUNNER_LIBRARY AND GENERATORRUNNER_INCLUDE_DIR)
SET(GENERATORRUNNER_FOUND "YES")
+ SET(GENERATORRUNNER_PUGIN_DIR @generator_plugin_DIR@)
+ SET(GENERATORRUNNER_VERSION "@generator_VERSION@"
ENDIF(GENERATORRUNNER_LIBRARY AND GENERATORRUNNER_INCLUDE_DIR)
-
-
diff --git a/boostpythongeneratorversion.h.in b/boostpythongeneratorversion.h.in
deleted file mode 100644
index 9d7d2b6..0000000
--- a/boostpythongeneratorversion.h.in
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef BOOSTPYTHONGENERATORVERSION_H
-#define BOOSTPYTHONGENERATORVERSION_H
-#define BOOSTPYTHONGENERATOR_VERSION "@boostpythongenerator_VERSION@"
-#endif
diff --git a/generator_plugin_dir.h.in b/generator_plugin_dir.h.in
deleted file mode 100644
index 8e914b3..0000000
--- a/generator_plugin_dir.h.in
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef GENERATOR_PLUGIN_DIR_H
-#define GENERATOR_PLUGIN_DIR_H
-#define GENERATOR_PUGIN_DIR "@generator_plugin_DIR@"
-#endif
diff --git a/generatorrunnerconfig.h.in b/generatorrunnerconfig.h.in
new file mode 100644
index 0000000..21ff345
--- /dev/null
+++ b/generatorrunnerconfig.h.in
@@ -0,0 +1,10 @@
+#ifndef GENERATORRUNNERCONFIG_H
+#define GENERATORRUNNERCONFIG_H
+
+// generatorrunner version
+#define GENERATORRUNNER_VERSION "@generator_VERSION@"
+
+// generatorrunner plugin dir
+#define GENERATORRUNNER_PUGIN_DIR "@generator_plugin_DIR@"
+
+#endif
diff --git a/main.cpp b/main.cpp
index c9bbfbd..bb852db 100644
--- a/main.cpp
+++ b/main.cpp
@@ -26,8 +26,7 @@
#include <QLibrary>
#include <iostream>
#include <apiextractor/apiextractor.h>
-#include "boostpythongeneratorversion.h"
-#include "generator_plugin_dir.h"
+#include "generatorrunnerconfig.h"
#include "generator.h"
#if defined(Q_OS_WIN32)
@@ -113,7 +112,7 @@ int main(int argc, char *argv[])
GeneratorList generators;
if (args.contains("version")) {
- std::cout << "generator v" BOOSTPYTHONGENERATOR_VERSION << std::endl;
+ std::cout << "generator v" GENERATORRUNNER_VERSION << std::endl;
std::cout << "Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)" << std::endl;
return EXIT_SUCCESS;
}
@@ -121,7 +120,7 @@ int main(int argc, char *argv[])
// Try to load a generator
QString generatorSet = args.value("generatorSet");
if (!generatorSet.isEmpty()) {
- QString generatorFile = QString(GENERATOR_PUGIN_DIR) + "/lib" + generatorSet + "_generator";
+ QString generatorFile = QString(GENERATORRUNNER_PUGIN_DIR) + "/lib" + generatorSet + "_generator";
QLibrary plugin(generatorFile);
getGeneratorsFunc getGenerators = reinterpret_cast<getGeneratorsFunc>(plugin.resolve("getGenerators"));
if (getGenerators)