Browse Source

Don't compile pluginSearchPaths() on platforms that don't need it.

pull/205/merge
Vladimír Vondruš 8 years ago
parent
commit
d48293c07f
  1. 4
      src/Magnum/Audio/AbstractImporter.cpp
  2. 5
      src/Magnum/Audio/AbstractImporter.h
  3. 6
      src/Magnum/Audio/CMakeLists.txt
  4. 4
      src/Magnum/Text/AbstractFont.cpp
  5. 5
      src/Magnum/Text/AbstractFont.h
  6. 4
      src/Magnum/Text/AbstractFontConverter.cpp
  7. 5
      src/Magnum/Text/AbstractFontConverter.h
  8. 6
      src/Magnum/Text/CMakeLists.txt
  9. 5
      src/Magnum/Trade/AbstractImageConverter.cpp
  10. 5
      src/Magnum/Trade/AbstractImageConverter.h
  11. 5
      src/Magnum/Trade/AbstractImporter.cpp
  12. 5
      src/Magnum/Trade/AbstractImporter.h
  13. 6
      src/Magnum/Trade/CMakeLists.txt

4
src/Magnum/Audio/AbstractImporter.cpp

@ -29,7 +29,9 @@
#include <Corrade/Utility/Assert.h> #include <Corrade/Utility/Assert.h>
#include <Corrade/Utility/Directory.h> #include <Corrade/Utility/Directory.h>
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
#include "Magnum/Audio/configure.h" #include "Magnum/Audio/configure.h"
#endif
namespace Magnum { namespace Audio { namespace Magnum { namespace Audio {
@ -37,6 +39,7 @@ std::string AbstractImporter::pluginInterface() {
return "cz.mosra.magnum.Audio.AbstractImporter/0.1"; return "cz.mosra.magnum.Audio.AbstractImporter/0.1";
} }
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractImporter::pluginSearchPaths() { std::vector<std::string> AbstractImporter::pluginSearchPaths() {
return { return {
#ifdef CORRADE_IS_DEBUG_BUILD #ifdef CORRADE_IS_DEBUG_BUILD
@ -48,6 +51,7 @@ std::vector<std::string> AbstractImporter::pluginSearchPaths() {
#endif #endif
}; };
} }
#endif
AbstractImporter::AbstractImporter() = default; AbstractImporter::AbstractImporter() = default;

5
src/Magnum/Audio/AbstractImporter.h

@ -93,6 +93,7 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractManagi
*/ */
static std::string pluginInterface(); static std::string pluginInterface();
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
/** /**
* @brief Plugin search paths * @brief Plugin search paths
* *
@ -103,8 +104,12 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractManagi
* system-wide plugin search directory is configurable using the * system-wide plugin search directory is configurable using the
* `MAGNUM_PLUGINS_DIR` CMake variables, see @ref building for more * `MAGNUM_PLUGINS_DIR` CMake variables, see @ref building for more
* information. * information.
*
* Not defined on platforms without
* @ref CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT "dynamic plugin support".
*/ */
static std::vector<std::string> pluginSearchPaths(); static std::vector<std::string> pluginSearchPaths();
#endif
/** @brief Default constructor */ /** @brief Default constructor */
explicit AbstractImporter(); explicit AbstractImporter();

6
src/Magnum/Audio/CMakeLists.txt

@ -44,8 +44,10 @@ set(MagnumAudio_HEADERS
visibility.h) visibility.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake if(NOT CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT)
${CMAKE_CURRENT_BINARY_DIR}/configure.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/configure.h)
endif()
if(WITH_SCENEGRAPH) if(WITH_SCENEGRAPH)
list(APPEND MagnumAudio_HEADERS list(APPEND MagnumAudio_HEADERS

4
src/Magnum/Text/AbstractFont.cpp

@ -32,7 +32,9 @@
#include "Magnum/Math/Functions.h" #include "Magnum/Math/Functions.h"
#include "Magnum/Text/GlyphCache.h" #include "Magnum/Text/GlyphCache.h"
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
#include "Magnum/Text/configure.h" #include "Magnum/Text/configure.h"
#endif
namespace Magnum { namespace Text { namespace Magnum { namespace Text {
@ -40,6 +42,7 @@ std::string AbstractFont::pluginInterface() {
return "cz.mosra.magnum.Text.AbstractFont/0.2.4"; return "cz.mosra.magnum.Text.AbstractFont/0.2.4";
} }
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractFont::pluginSearchPaths() { std::vector<std::string> AbstractFont::pluginSearchPaths() {
return { return {
#ifdef CORRADE_IS_DEBUG_BUILD #ifdef CORRADE_IS_DEBUG_BUILD
@ -51,6 +54,7 @@ std::vector<std::string> AbstractFont::pluginSearchPaths() {
#endif #endif
}; };
} }
#endif
AbstractFont::AbstractFont(): _size(0.0f) {} AbstractFont::AbstractFont(): _size(0.0f) {}

5
src/Magnum/Text/AbstractFont.h

@ -109,6 +109,7 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
*/ */
static std::string pluginInterface(); static std::string pluginInterface();
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
/** /**
* @brief Plugin search paths * @brief Plugin search paths
* *
@ -118,8 +119,12 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
* `bin/` on Windows). The system-wide plugin search directory is * `bin/` on Windows). The system-wide plugin search directory is
* configurable using the `MAGNUM_PLUGINS_DIR` CMake variables, see * configurable using the `MAGNUM_PLUGINS_DIR` CMake variables, see
* @ref building for more information. * @ref building for more information.
*
* Not defined on platforms without
* @ref CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT "dynamic plugin support".
*/ */
static std::vector<std::string> pluginSearchPaths(); static std::vector<std::string> pluginSearchPaths();
#endif
/** @brief Default constructor */ /** @brief Default constructor */
explicit AbstractFont(); explicit AbstractFont();

4
src/Magnum/Text/AbstractFontConverter.cpp

@ -33,7 +33,9 @@
#include "Magnum/Text/GlyphCache.h" #include "Magnum/Text/GlyphCache.h"
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
#include "Magnum/Text/configure.h" #include "Magnum/Text/configure.h"
#endif
namespace Magnum { namespace Text { namespace Magnum { namespace Text {
@ -57,6 +59,7 @@ std::string AbstractFontConverter::pluginInterface() {
return "cz.mosra.magnum.Text.AbstractFontConverter/0.1.2"; return "cz.mosra.magnum.Text.AbstractFontConverter/0.1.2";
} }
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractFontConverter::pluginSearchPaths() { std::vector<std::string> AbstractFontConverter::pluginSearchPaths() {
return { return {
#ifdef CORRADE_IS_DEBUG_BUILD #ifdef CORRADE_IS_DEBUG_BUILD
@ -68,6 +71,7 @@ std::vector<std::string> AbstractFontConverter::pluginSearchPaths() {
#endif #endif
}; };
} }
#endif
AbstractFontConverter::AbstractFontConverter() = default; AbstractFontConverter::AbstractFontConverter() = default;

5
src/Magnum/Text/AbstractFontConverter.h

@ -135,6 +135,7 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
*/ */
static std::string pluginInterface(); static std::string pluginInterface();
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
/** /**
* @brief Plugin search paths * @brief Plugin search paths
* *
@ -145,8 +146,12 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
* system-wide plugin search directory is configurable using the * system-wide plugin search directory is configurable using the
* `MAGNUM_PLUGINS_DIR` CMake variables, see @ref building for more * `MAGNUM_PLUGINS_DIR` CMake variables, see @ref building for more
* information. * information.
*
* Not defined on platforms without
* @ref CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT "dynamic plugin support".
*/ */
static std::vector<std::string> pluginSearchPaths(); static std::vector<std::string> pluginSearchPaths();
#endif
/** @brief Default constructor */ /** @brief Default constructor */
explicit AbstractFontConverter(); explicit AbstractFontConverter();

6
src/Magnum/Text/CMakeLists.txt

@ -40,8 +40,10 @@ set(MagnumText_HEADERS
visibility.h) visibility.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake if(NOT CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT)
${CMAKE_CURRENT_BINARY_DIR}/configure.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/configure.h)
endif()
# Text library # Text library
add_library(MagnumText ${SHARED_OR_STATIC} add_library(MagnumText ${SHARED_OR_STATIC}

5
src/Magnum/Trade/AbstractImageConverter.cpp

@ -31,7 +31,10 @@
#include "Magnum/Image.h" #include "Magnum/Image.h"
#include "Magnum/Trade/ImageData.h" #include "Magnum/Trade/ImageData.h"
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
#include "Magnum/Trade/configure.h" #include "Magnum/Trade/configure.h"
#endif
namespace Magnum { namespace Trade { namespace Magnum { namespace Trade {
@ -39,6 +42,7 @@ std::string AbstractImageConverter::pluginInterface() {
return "cz.mosra.magnum.Trade.AbstractImageConverter/0.2.1"; return "cz.mosra.magnum.Trade.AbstractImageConverter/0.2.1";
} }
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractImageConverter::pluginSearchPaths() { std::vector<std::string> AbstractImageConverter::pluginSearchPaths() {
return { return {
#ifdef CORRADE_IS_DEBUG_BUILD #ifdef CORRADE_IS_DEBUG_BUILD
@ -50,6 +54,7 @@ std::vector<std::string> AbstractImageConverter::pluginSearchPaths() {
#endif #endif
}; };
} }
#endif
AbstractImageConverter::AbstractImageConverter() = default; AbstractImageConverter::AbstractImageConverter() = default;

5
src/Magnum/Trade/AbstractImageConverter.h

@ -123,6 +123,7 @@ class MAGNUM_EXPORT AbstractImageConverter: public PluginManager::AbstractManagi
*/ */
static std::string pluginInterface(); static std::string pluginInterface();
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
/** /**
* @brief Plugin search paths * @brief Plugin search paths
* *
@ -133,8 +134,12 @@ class MAGNUM_EXPORT AbstractImageConverter: public PluginManager::AbstractManagi
* system-wide plugin search directory is configurable using the * system-wide plugin search directory is configurable using the
* `MAGNUM_PLUGINS_DIR` CMake variables, see @ref building for more * `MAGNUM_PLUGINS_DIR` CMake variables, see @ref building for more
* information. * information.
*
* Not defined on platforms without
* @ref CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT "dynamic plugin support".
*/ */
static std::vector<std::string> pluginSearchPaths(); static std::vector<std::string> pluginSearchPaths();
#endif
/** @brief Default constructor */ /** @brief Default constructor */
explicit AbstractImageConverter(); explicit AbstractImageConverter();

5
src/Magnum/Trade/AbstractImporter.cpp

@ -40,7 +40,10 @@
#include "Magnum/Trade/ObjectData3D.h" #include "Magnum/Trade/ObjectData3D.h"
#include "Magnum/Trade/SceneData.h" #include "Magnum/Trade/SceneData.h"
#include "Magnum/Trade/TextureData.h" #include "Magnum/Trade/TextureData.h"
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
#include "Magnum/Trade/configure.h" #include "Magnum/Trade/configure.h"
#endif
namespace Magnum { namespace Trade { namespace Magnum { namespace Trade {
@ -48,6 +51,7 @@ std::string AbstractImporter::pluginInterface() {
return "cz.mosra.magnum.Trade.AbstractImporter/0.3"; return "cz.mosra.magnum.Trade.AbstractImporter/0.3";
} }
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractImporter::pluginSearchPaths() { std::vector<std::string> AbstractImporter::pluginSearchPaths() {
return { return {
#ifdef CORRADE_IS_DEBUG_BUILD #ifdef CORRADE_IS_DEBUG_BUILD
@ -59,6 +63,7 @@ std::vector<std::string> AbstractImporter::pluginSearchPaths() {
#endif #endif
}; };
} }
#endif
AbstractImporter::AbstractImporter() = default; AbstractImporter::AbstractImporter() = default;

5
src/Magnum/Trade/AbstractImporter.h

@ -113,6 +113,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractManagingPlug
*/ */
static std::string pluginInterface(); static std::string pluginInterface();
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
/** /**
* @brief Plugin search paths * @brief Plugin search paths
* *
@ -122,8 +123,12 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractManagingPlug
* Unix-like systems, `bin/` on Windows). The system-wide plugin search * Unix-like systems, `bin/` on Windows). The system-wide plugin search
* directory is configurable using the `MAGNUM_PLUGINS_DIR` CMake * directory is configurable using the `MAGNUM_PLUGINS_DIR` CMake
* variables, see @ref building for more information. * variables, see @ref building for more information.
*
* Not defined on platforms without
* @ref CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT "dynamic plugin support".
*/ */
static std::vector<std::string> pluginSearchPaths(); static std::vector<std::string> pluginSearchPaths();
#endif
/** @brief Default constructor */ /** @brief Default constructor */
explicit AbstractImporter(); explicit AbstractImporter();

6
src/Magnum/Trade/CMakeLists.txt

@ -41,8 +41,10 @@ set(MagnumTrade_HEADERS
TextureData.h TextureData.h
Trade.h) Trade.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake if(NOT CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT)
${CMAKE_CURRENT_BINARY_DIR}/configure.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/configure.h)
endif()
# Force IDEs to display all header files in project view # Force IDEs to display all header files in project view
add_custom_target(MagnumTrade SOURCES ${MagnumTrade_HEADERS}) add_custom_target(MagnumTrade SOURCES ${MagnumTrade_HEADERS})

Loading…
Cancel
Save