summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-07-19 12:15:03 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-07-19 15:16:22 -0300
commitb8d7a7cb99a6123babf738d16743cc96ba8869be (patch)
tree5e4552a4d208a018fd62c176f9f25f9736af5419
parente826abb238fcd991f4496cc896a8e0c45cc81a48 (diff)
downloadgeneratorrunner-b8d7a7cb99a6123babf738d16743cc96ba8869be.tar.gz
generatorrunner-b8d7a7cb99a6123babf738d16743cc96ba8869be.tar.xz
generatorrunner-b8d7a7cb99a6123babf738d16743cc96ba8869be.zip
Removed lib prefix from generators plugin.0.6.0
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--generators/qtdoc/CMakeLists.txt1
-rw-r--r--main.cpp11
2 files changed, 6 insertions, 6 deletions
diff --git a/generators/qtdoc/CMakeLists.txt b/generators/qtdoc/CMakeLists.txt
index f943a7c..8b2f9e0 100644
--- a/generators/qtdoc/CMakeLists.txt
+++ b/generators/qtdoc/CMakeLists.txt
@@ -9,6 +9,7 @@ target_link_libraries(docgenerator ${QT_QTCORE_LIBRARY})
add_library(qtdoc_generator SHARED ${qtdoc_generator_SRC})
target_link_libraries(qtdoc_generator ${APIEXTRACTOR_LIBRARY} ${QT_QTCORE_LIBRARY} genrunner)
+set_property(TARGET qtdoc_generator PROPERTY PREFIX "")
install(TARGETS qtdoc_generator DESTINATION ${generator_plugin_DIR})
install(TARGETS docgenerator DESTINATION bin)
diff --git a/main.cpp b/main.cpp
index de61112..55e658a 100644
--- a/main.cpp
+++ b/main.cpp
@@ -116,13 +116,12 @@ int main(int argc, char *argv[])
// Try to load a generator
QString generatorSet = args.value("generatorSet");
if (!generatorSet.isEmpty()) {
- QString generatorFile;
- if (generatorSet.contains(QDir::separator()))
- generatorFile = generatorSet;
- else
- generatorFile = QString(GENERATORRUNNER_PLUGIN_DIR) + "/lib" + generatorSet + "_generator";
+ QFileInfo generatorFile(generatorSet);
- QLibrary plugin(generatorFile);
+ if (generatorFile.baseName() == generatorSet)
+ generatorFile.setFile(QDir(GENERATORRUNNER_PLUGIN_DIR), generatorSet + "_generator");
+
+ QLibrary plugin(generatorFile.filePath());
getGeneratorsFunc getGenerators = (getGeneratorsFunc)plugin.resolve("getGenerators");
if (getGenerators)
getGenerators(&generators);