From 186adfbd7353d7bac09ac4348f76fb0a291f5a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 23 May 2012 17:38:31 +0200 Subject: [PATCH] Fixed plugin registration after recent object library changes. --- src/Plugins/TgaImporter/CMakeLists.txt | 2 +- src/Plugins/TgaImporter/TgaImporter.cpp | 3 --- .../TgaImporterPluginRegistration.cpp | 19 +++++++++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 src/Plugins/TgaImporter/TgaImporterPluginRegistration.cpp diff --git a/src/Plugins/TgaImporter/CMakeLists.txt b/src/Plugins/TgaImporter/CMakeLists.txt index 59531ee85..601cba762 100644 --- a/src/Plugins/TgaImporter/CMakeLists.txt +++ b/src/Plugins/TgaImporter/CMakeLists.txt @@ -1,7 +1,7 @@ add_library(TgaImporterObjects OBJECT TgaImporter.cpp) set_target_properties(TgaImporterObjects PROPERTIES COMPILE_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}) -corrade_add_plugin(TgaImporter ${MAGNUM_PLUGINS_IMPORTER_INSTALL_DIR} TgaImporter.conf $) +corrade_add_plugin(TgaImporter ${MAGNUM_PLUGINS_IMPORTER_INSTALL_DIR} TgaImporter.conf $ TgaImporterPluginRegistration.cpp) target_link_libraries(TgaImporter ${MAGNUM_LIBRARY}) if(BUILD_TESTS) diff --git a/src/Plugins/TgaImporter/TgaImporter.cpp b/src/Plugins/TgaImporter/TgaImporter.cpp index ec37e8443..b137901e6 100644 --- a/src/Plugins/TgaImporter/TgaImporter.cpp +++ b/src/Plugins/TgaImporter/TgaImporter.cpp @@ -22,9 +22,6 @@ using namespace std; using namespace Corrade::Utility; -PLUGIN_REGISTER(TgaImporter, Magnum::Trade::TgaImporter::TgaImporter, - "cz.mosra.magnum.Trade.AbstractImporter/0.1") - namespace Magnum { namespace Trade { namespace TgaImporter { static_assert(sizeof(TgaImporter::Header) == 18, "TgaImporter: header size is not 18 bytes"); diff --git a/src/Plugins/TgaImporter/TgaImporterPluginRegistration.cpp b/src/Plugins/TgaImporter/TgaImporterPluginRegistration.cpp new file mode 100644 index 000000000..a408bef17 --- /dev/null +++ b/src/Plugins/TgaImporter/TgaImporterPluginRegistration.cpp @@ -0,0 +1,19 @@ +/* + Copyright © 2010, 2011, 2012 Vladimír Vondruš + + This file is part of Magnum. + + Magnum is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License version 3 + only, as published by the Free Software Foundation. + + Magnum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License version 3 for more details. +*/ + +#include "TgaImporter.h" + +PLUGIN_REGISTER(TgaImporter, Magnum::Trade::TgaImporter::TgaImporter, + "cz.mosra.magnum.Trade.AbstractImporter/0.1")