From e27f3b4e124a44c11cd388f39eefe84b97d3af46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 26 Mar 2018 14:29:05 +0200 Subject: [PATCH] Automagic way of importing static plugins. Statically built plugins get imported automatically when using CMake 3.1 and newer. Otherwise simply #include a corresponding importStaticPlugin.cpp file. --- doc/changelog.dox | 4 +++ modules/FindMagnum.cmake | 11 ++++++ src/MagnumPlugins/MagnumFont/CMakeLists.txt | 8 +++++ .../MagnumFont/importStaticPlugin.cpp | 35 +++++++++++++++++++ .../MagnumFontConverter/CMakeLists.txt | 8 +++++ .../importStaticPlugin.cpp | 35 +++++++++++++++++++ src/MagnumPlugins/ObjImporter/CMakeLists.txt | 8 +++++ .../ObjImporter/importStaticPlugin.cpp | 35 +++++++++++++++++++ .../TgaImageConverter/CMakeLists.txt | 8 +++++ .../TgaImageConverter/importStaticPlugin.cpp | 35 +++++++++++++++++++ src/MagnumPlugins/TgaImporter/CMakeLists.txt | 8 +++++ .../TgaImporter/importStaticPlugin.cpp | 35 +++++++++++++++++++ .../WavAudioImporter/CMakeLists.txt | 8 +++++ .../WavAudioImporter/importStaticPlugin.cpp | 35 +++++++++++++++++++ 14 files changed, 273 insertions(+) create mode 100644 src/MagnumPlugins/MagnumFont/importStaticPlugin.cpp create mode 100644 src/MagnumPlugins/MagnumFontConverter/importStaticPlugin.cpp create mode 100644 src/MagnumPlugins/ObjImporter/importStaticPlugin.cpp create mode 100644 src/MagnumPlugins/TgaImageConverter/importStaticPlugin.cpp create mode 100644 src/MagnumPlugins/TgaImporter/importStaticPlugin.cpp create mode 100644 src/MagnumPlugins/WavAudioImporter/importStaticPlugin.cpp diff --git a/doc/changelog.dox b/doc/changelog.dox index 7d4e94984..ac704328b 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -80,6 +80,10 @@ See also: for plugin directory autodetection --- you no longer need to specify the plugin directory explicitly when loading plugins. See @ref plugins-loading for more information. +- Plugins now provide an automatic means of static plugin import via CMake + targets, no need to call @ref CORRADE_PLUGIN_IMPORT() implicitly anymore. + For this to work, you just need to update local copies of all Find modules. + See @ref plugins-static for more information. @subsection changelog-latest-bugfixes Bug fixes diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake index 632b3a82a..b7efe930f 100644 --- a/modules/FindMagnum.cmake +++ b/modules/FindMagnum.cmake @@ -642,6 +642,17 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) mark_as_advanced(_MAGNUM_${_COMPONENT}_INCLUDE_DIR) endif() + # Automatic import of static plugins on CMake >= 3.1 + if(_component MATCHES ${_MAGNUM_PLUGIN_COMPONENTS} AND NOT CMAKE_VERSION VERSION_LESS 3.1) + # Automatic import of static plugins + file(READ ${_MAGNUM_${_COMPONENT}_INCLUDE_DIR}/configure.h _magnum${_component}Configure) + string(FIND "${_magnum${_component}Configure}" "#define MAGNUM_${_COMPONENT}_BUILD_STATIC" _magnum${_component}_BUILD_STATIC) + if(NOT _magnum${_component}_BUILD_STATIC EQUAL -1) + set_property(TARGET Magnum::${_component} APPEND PROPERTY + INTERFACE_SOURCES ${_MAGNUM_${_COMPONENT}_INCLUDE_DIR}/importStaticPlugin.cpp) + endif() + endif() + # Link to core Magnum library, add inter-library dependencies if(_component MATCHES ${_MAGNUM_LIBRARY_COMPONENTS} OR _component MATCHES ${_MAGNUM_PLUGIN_COMPONENTS}) set_property(TARGET Magnum::${_component} APPEND PROPERTY diff --git a/src/MagnumPlugins/MagnumFont/CMakeLists.txt b/src/MagnumPlugins/MagnumFont/CMakeLists.txt index 1d9ceaf39..2a7c254de 100644 --- a/src/MagnumPlugins/MagnumFont/CMakeLists.txt +++ b/src/MagnumPlugins/MagnumFont/CMakeLists.txt @@ -69,6 +69,14 @@ endif() install(FILES ${MagnumFont_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/MagnumFont) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/configure.h DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/MagnumFont) +# Automatic static plugin import +if(BUILD_PLUGINS_STATIC) + install(FILES importStaticPlugin.cpp DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/MagnumFont) + if(NOT CMAKE_VERSION VERSION_LESS 3.1) + target_sources(MagnumFont INTERFACE importStaticPlugin.cpp) + endif() +endif() + if(BUILD_GL_TESTS) # On Win32 we need to avoid dllimporting TgaImporter symbols, because it # would search for the symbols in some DLL even when they were linked diff --git a/src/MagnumPlugins/MagnumFont/importStaticPlugin.cpp b/src/MagnumPlugins/MagnumFont/importStaticPlugin.cpp new file mode 100644 index 000000000..a43d17935 --- /dev/null +++ b/src/MagnumPlugins/MagnumFont/importStaticPlugin.cpp @@ -0,0 +1,35 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +#include "MagnumPlugins/MagnumFont/configure.h" + +#ifdef MAGNUM_MAGNUMFONT_BUILD_STATIC +#include + +static int magnumMagnumFontStaticImporter() { + CORRADE_PLUGIN_IMPORT(MagnumFont) + return 1; +} CORRADE_AUTOMATIC_INITIALIZER(magnumMagnumFontStaticImporter) +#endif diff --git a/src/MagnumPlugins/MagnumFontConverter/CMakeLists.txt b/src/MagnumPlugins/MagnumFontConverter/CMakeLists.txt index 936d55e12..8536072dc 100644 --- a/src/MagnumPlugins/MagnumFontConverter/CMakeLists.txt +++ b/src/MagnumPlugins/MagnumFontConverter/CMakeLists.txt @@ -69,6 +69,14 @@ endif() install(FILES ${MagnumFontConverter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/MagnumFontConverter) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/configure.h DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/MagnumFontConverter) +# Automatic static plugin import +if(BUILD_PLUGINS_STATIC) + install(FILES importStaticPlugin.cpp DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/MagnumFontConverter) + if(NOT CMAKE_VERSION VERSION_LESS 3.1) + target_sources(MagnumFontConverter INTERFACE importStaticPlugin.cpp) + endif() +endif() + if(BUILD_GL_TESTS) # On Win32 we need to avoid dllimporting TgaImageConverter symbols, because # it would search for the symbols in some DLL even when they were linked diff --git a/src/MagnumPlugins/MagnumFontConverter/importStaticPlugin.cpp b/src/MagnumPlugins/MagnumFontConverter/importStaticPlugin.cpp new file mode 100644 index 000000000..c4a6fe9ac --- /dev/null +++ b/src/MagnumPlugins/MagnumFontConverter/importStaticPlugin.cpp @@ -0,0 +1,35 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +#include "MagnumPlugins/MagnumFontConverter/configure.h" + +#ifdef MAGNUM_MAGNUMFONTCONVERTER_BUILD_STATIC +#include + +static int magnumMagnumFontConverterStaticImporter() { + CORRADE_PLUGIN_IMPORT(MagnumFontConverter) + return 1; +} CORRADE_AUTOMATIC_INITIALIZER(magnumMagnumFontConverterStaticImporter) +#endif diff --git a/src/MagnumPlugins/ObjImporter/CMakeLists.txt b/src/MagnumPlugins/ObjImporter/CMakeLists.txt index 26f9e097d..a9a275618 100644 --- a/src/MagnumPlugins/ObjImporter/CMakeLists.txt +++ b/src/MagnumPlugins/ObjImporter/CMakeLists.txt @@ -64,6 +64,14 @@ target_link_libraries(ObjImporter Magnum MagnumMeshTools) install(FILES ${ObjImporter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/ObjImporter) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/configure.h DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/ObjImporter) +# Automatic static plugin import +if(BUILD_PLUGINS_STATIC) + install(FILES importStaticPlugin.cpp DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/ObjImporter) + if(NOT CMAKE_VERSION VERSION_LESS 3.1) + target_sources(ObjImporter INTERFACE importStaticPlugin.cpp) + endif() +endif() + if(BUILD_TESTS) add_library(MagnumObjImporterTestLib STATIC $ diff --git a/src/MagnumPlugins/ObjImporter/importStaticPlugin.cpp b/src/MagnumPlugins/ObjImporter/importStaticPlugin.cpp new file mode 100644 index 000000000..e9a8e5a7b --- /dev/null +++ b/src/MagnumPlugins/ObjImporter/importStaticPlugin.cpp @@ -0,0 +1,35 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +#include "MagnumPlugins/ObjImporter/configure.h" + +#ifdef MAGNUM_OBJIMPORTER_BUILD_STATIC +#include + +static int magnumObjImporterStaticImporter() { + CORRADE_PLUGIN_IMPORT(ObjImporter) + return 1; +} CORRADE_AUTOMATIC_INITIALIZER(magnumObjImporterStaticImporter) +#endif diff --git a/src/MagnumPlugins/TgaImageConverter/CMakeLists.txt b/src/MagnumPlugins/TgaImageConverter/CMakeLists.txt index 35122fbf6..49c6b6c28 100644 --- a/src/MagnumPlugins/TgaImageConverter/CMakeLists.txt +++ b/src/MagnumPlugins/TgaImageConverter/CMakeLists.txt @@ -64,6 +64,14 @@ target_link_libraries(TgaImageConverter Magnum) install(FILES ${TgaImageConverter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/TgaImageConverter) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/configure.h DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/TgaImageConverter) +# Automatic static plugin import +if(BUILD_PLUGINS_STATIC) + install(FILES importStaticPlugin.cpp DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/TgaImageConverter) + if(NOT CMAKE_VERSION VERSION_LESS 3.1) + target_sources(TgaImageConverter INTERFACE importStaticPlugin.cpp) + endif() +endif() + if(BUILD_TESTS) add_library(MagnumTgaImageConverterTestLib STATIC $ diff --git a/src/MagnumPlugins/TgaImageConverter/importStaticPlugin.cpp b/src/MagnumPlugins/TgaImageConverter/importStaticPlugin.cpp new file mode 100644 index 000000000..3dd984619 --- /dev/null +++ b/src/MagnumPlugins/TgaImageConverter/importStaticPlugin.cpp @@ -0,0 +1,35 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +#include "MagnumPlugins/TgaImageConverter/configure.h" + +#ifdef MAGNUM_TGAIMAGECONVERTER_BUILD_STATIC +#include + +static int magnumTgaImageConverterStaticImporter() { + CORRADE_PLUGIN_IMPORT(TgaImageConverter) + return 1; +} CORRADE_AUTOMATIC_INITIALIZER(magnumTgaImageConverterStaticImporter) +#endif diff --git a/src/MagnumPlugins/TgaImporter/CMakeLists.txt b/src/MagnumPlugins/TgaImporter/CMakeLists.txt index f0cb0df8e..8494023ca 100644 --- a/src/MagnumPlugins/TgaImporter/CMakeLists.txt +++ b/src/MagnumPlugins/TgaImporter/CMakeLists.txt @@ -68,6 +68,14 @@ target_link_libraries(TgaImporter Magnum) install(FILES ${TgaImporter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/TgaImporter) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/configure.h DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/TgaImporter) +# Automatic static plugin import +if(BUILD_PLUGINS_STATIC) + install(FILES importStaticPlugin.cpp DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/TgaImporter) + if(NOT CMAKE_VERSION VERSION_LESS 3.1) + target_sources(TgaImporter INTERFACE importStaticPlugin.cpp) + endif() +endif() + if(BUILD_TESTS) add_library(MagnumTgaImporterTestLib STATIC $ diff --git a/src/MagnumPlugins/TgaImporter/importStaticPlugin.cpp b/src/MagnumPlugins/TgaImporter/importStaticPlugin.cpp new file mode 100644 index 000000000..3841f242e --- /dev/null +++ b/src/MagnumPlugins/TgaImporter/importStaticPlugin.cpp @@ -0,0 +1,35 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +#include "MagnumPlugins/TgaImporter/configure.h" + +#ifdef MAGNUM_TGAIMPORTER_BUILD_STATIC +#include + +static int magnumTgaImporterStaticImporter() { + CORRADE_PLUGIN_IMPORT(TgaImporter) + return 1; +} CORRADE_AUTOMATIC_INITIALIZER(magnumTgaImporterStaticImporter) +#endif diff --git a/src/MagnumPlugins/WavAudioImporter/CMakeLists.txt b/src/MagnumPlugins/WavAudioImporter/CMakeLists.txt index 4f59ee9ec..2f2038fb9 100644 --- a/src/MagnumPlugins/WavAudioImporter/CMakeLists.txt +++ b/src/MagnumPlugins/WavAudioImporter/CMakeLists.txt @@ -71,6 +71,14 @@ target_link_libraries(WavAudioImporter Magnum MagnumAudio) install(FILES ${WavAudioImporter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/WavAudioImporter) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/configure.h DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/WavAudioImporter) +# Automatic static plugin import +if(BUILD_PLUGINS_STATIC) + install(FILES importStaticPlugin.cpp DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/WavAudioImporter) + if(NOT CMAKE_VERSION VERSION_LESS 3.1) + target_sources(WavAudioImporter INTERFACE importStaticPlugin.cpp) + endif() +endif() + if(BUILD_TESTS) add_library(MagnumWavAudioImporterTestLib STATIC $ diff --git a/src/MagnumPlugins/WavAudioImporter/importStaticPlugin.cpp b/src/MagnumPlugins/WavAudioImporter/importStaticPlugin.cpp new file mode 100644 index 000000000..a42d71af5 --- /dev/null +++ b/src/MagnumPlugins/WavAudioImporter/importStaticPlugin.cpp @@ -0,0 +1,35 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + Vladimír Vondruš + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +#include "MagnumPlugins/WavAudioImporter/configure.h" + +#ifdef MAGNUM_WAVAUDIOIMPORTER_BUILD_STATIC +#include + +static int magnumWavAudioImporterStaticImporter() { + CORRADE_PLUGIN_IMPORT(WavAudioImporter) + return 1; +} CORRADE_AUTOMATIC_INITIALIZER(magnumWavAudioImporterStaticImporter) +#endif