From de5b2524086b65b043912937b7ca57c12438268f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 27 Jun 2026 18:45:31 +0200 Subject: [PATCH] Forgot to update these for MagnumFont{,Converter} being deprecated. --- CMakeLists.txt | 10 ++++++---- doc/building.dox | 14 +++++++------- doc/cmake.dox | 7 ++++--- doc/namespaces.dox | 8 ++++++++ modules/FindMagnum.cmake | 23 +++++++++++++++-------- 5 files changed, 40 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71f225098..b8d9d90e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -176,6 +176,8 @@ if(NOT DEFINED _MAGNUM_ACCEPT_DEPRECATED_UNPREFIXED_OPTIONS) endforeach() endif() +option(MAGNUM_BUILD_DEPRECATED "Include deprecated API in the build" ON) + # Magnum GL Info (currently only using GLX/CGL/EGL on *nix, WGL/EGL on Windows # and EGL on Emscripten) if(CORRADE_TARGET_UNIX OR CORRADE_TARGET_WINDOWS OR CORRADE_TARGET_EMSCRIPTEN) @@ -226,8 +228,10 @@ option(MAGNUM_WITH_ANYSCENECONVERTER "Build AnySceneConverter plugin" OFF) option(MAGNUM_WITH_ANYSCENEIMPORTER "Build AnySceneImporter plugin" OFF) option(MAGNUM_WITH_ANYSHADERCONVERTER "Build AnyShaderConverter plugin" OFF) option(MAGNUM_WITH_WAVAUDIOIMPORTER "Build WavAudioImporter plugin" OFF) -option(MAGNUM_WITH_MAGNUMFONT "Build MagnumFont plugin" OFF) -option(MAGNUM_WITH_MAGNUMFONTCONVERTER "Build MagnumFontConverter plugin" OFF) +if(MAGNUM_BUILD_DEPRECATED) + option(MAGNUM_WITH_MAGNUMFONT "Build MagnumFont plugin" OFF) + option(MAGNUM_WITH_MAGNUMFONTCONVERTER "Build MagnumFontConverter plugin" OFF) +endif() option(MAGNUM_WITH_OBJIMPORTER "Build ObjImporter plugin" OFF) cmake_dependent_option(MAGNUM_WITH_TGAIMAGECONVERTER "Build TgaImageConverter plugin" OFF "NOT MAGNUM_WITH_MAGNUMFONTCONVERTER" ON) cmake_dependent_option(MAGNUM_WITH_TGAIMPORTER "Build TgaImporter plugin" OFF "NOT MAGNUM_WITH_MAGNUMFONT" ON) @@ -350,8 +354,6 @@ if(NOT CORRADE_TARGET_ANDROID AND NOT CORRADE_TARGET_IOS AND NOT CORRADE_TARGET_ option(MAGNUM_WITH_GLFWAPPLICATION "Build GlfwApplication library" OFF) endif() -option(MAGNUM_BUILD_DEPRECATED "Include deprecated API in the build" ON) - set(MAGNUM_DEPLOY_PREFIX "." CACHE STRING "Prefix where to put final application executables") diff --git a/doc/building.dox b/doc/building.dox index 5a9833dc4..d763271bd 100644 --- a/doc/building.dox +++ b/doc/building.dox @@ -675,14 +675,14 @@ default. - `MAGNUM_WITH_ANYSHADERCONVERTER` --- Build the @ref ShaderTools::AnyConverter "AnyShaderConverter" plugin. Enables also building of the @ref ShaderTools library. -- `MAGNUM_WITH_MAGNUMFONT` --- Build the @ref Text::MagnumFont "MagnumFont" - plugin. Enables also building of the @ref Text library and the - @ref Trade::TgaImporter "TgaImporter" plugin. Requires `MAGNUM_TARGET_GL` - to be enabled. -- `MAGNUM_WITH_MAGNUMFONTCONVERTER` --- Build the - @ref Text::MagnumFontConverter "MagnumFontConverter" plugin. Enables also +- `MAGNUM_WITH_MAGNUMFONT` @m_class{m-label m-danger} **deprecated** --- + Build the @relativeref{Text,MagnumFont} plugin. Enables also building + of the @ref Text library and the @relativeref{Trade,TgaImporter} plugin. + Requires `MAGNUM_TARGET_GL` to be enabled. +- `MAGNUM_WITH_MAGNUMFONTCONVERTER` @m_class{m-label m-danger} **deprecated** + --- Build the @relativeref{Text,MagnumFontConverter} plugin. Enables also building of the @ref Text library and the - @ref Trade::TgaImageConverter "TgaImageConverter" plugin. + @relativeref{Trade,TgaImageConverter} plugin. - `MAGNUM_WITH_OBJIMPORTER` --- Build the @ref Trade::ObjImporter "ObjImporter" plugin. Enables also building of the @ref Trade library. diff --git a/doc/cmake.dox b/doc/cmake.dox index eea644943..ed38b2998 100644 --- a/doc/cmake.dox +++ b/doc/cmake.dox @@ -250,9 +250,10 @@ dependencies, you need to find the dependency and then link to it. plugin - `AnyShaderConverter` --- @ref ShaderTools::AnyConverter "AnyShaderConverter" plugin -- `MagnumFont` --- @ref Text::MagnumFont "MagnumFont" plugin -- `MagnumFontConverter` --- @ref Text::MagnumFontConverter "MagnumFontConverter" - plugin +- `MagnumFont` @m_class{m-label m-danger} **deprecated** --- + @relativeref{Text,MagnumFont} plugin +- `MagnumFontConverter` @m_class{m-label m-danger} **deprecated** --- + @relativeref{Text,MagnumFontConverter} plugin - `ObjImporter` --- @ref Trade::ObjImporter "ObjImporter" plugin - `TgaImageConverter` --- @ref Trade::TgaImageConverter "TgaImageConverter" plugin diff --git a/doc/namespaces.dox b/doc/namespaces.dox index 50e55a57f..08f4e9410 100644 --- a/doc/namespaces.dox +++ b/doc/namespaces.dox @@ -988,9 +988,17 @@ See @ref building, @ref cmake and @ref vulkan for more information. */ /** @dir MagnumPlugins/MagnumFont * @brief Plugin @ref Magnum::Text::MagnumFont + * @m_deprecated_since_latest Use @ref MagnumPlugins/StbTrueTypeFont/StbTrueTypeFont.h + * and the @relativeref{Magnum::Text,StbTrueTypeFont} plugin instead, + * which is more efficient and has a larger feature set without needing a + * custom font preprocessing step. */ /** @dir MagnumPlugins/MagnumFontConverter * @brief Plugin @ref Magnum::Text::MagnumFontConverter + * @m_deprecated_since_latest Use @ref MagnumPlugins/StbTrueTypeFont/StbTrueTypeFont.h + * and the @relativeref{Magnum::Text,StbTrueTypeFont} plugin instead, + * which is more efficient and has a larger feature set without needing a + * custom font preprocessing step. */ /** @dir MagnumPlugins/ObjImporter * @brief Plugin @ref Magnum::Trade::ObjImporter diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake index 02b64016d..1886d7528 100644 --- a/modules/FindMagnum.cmake +++ b/modules/FindMagnum.cmake @@ -85,8 +85,6 @@ # WglContext - WGL context # OpenGLTester - OpenGLTester class # VulkanTester - VulkanTester class -# MagnumFont - Magnum bitmap font plugin -# MagnumFontConverter - Magnum bitmap font converter plugin # ObjImporter - OBJ importer plugin # TgaImageConverter - TGA image converter plugin # TgaImporter - TGA importer plugin @@ -100,6 +98,12 @@ # vk-info - magnum-vk-info executable # al-info - magnum-al-info executable # +# If Magnum is built with MAGNUM_BUILD_DEPRECATED enabled, these additional +# plugins are available for backwards compatibility purposes: +# +# MagnumFont - Magnum bitmap font plugin +# MagnumFontConverter - Magnum bitmap font converter plugin +# # Example usage with specifying additional components is:: # # find_package(Magnum REQUIRED Trade MeshTools Primitives GlfwApplication) @@ -406,8 +410,8 @@ set(_MAGNUM_LIBRARY_COMPONENTS_ALWAYS_STATIC OpenGLTester) set(_MAGNUM_PLUGIN_COMPONENTS AnyAudioImporter AnyImageConverter AnyImageImporter AnySceneConverter - AnySceneImporter MagnumFont MagnumFontConverter ObjImporter - TgaImageConverter TgaImporter WavAudioImporter) + AnySceneImporter ObjImporter TgaImageConverter TgaImporter + WavAudioImporter) set(_MAGNUM_EXECUTABLE_COMPONENTS imageconverter sceneconverter shaderconverter gl-info al-info) # Audio and Vk libs aren't enabled by default, and none of the Context, @@ -545,8 +549,6 @@ set(_MAGNUM_EglContext_DEPENDENCIES GL) set(_MAGNUM_GlxContext_DEPENDENCIES GL) set(_MAGNUM_WglContext_DEPENDENCIES GL) -set(_MAGNUM_MagnumFont_DEPENDENCIES Trade TgaImporter GL) # and below -set(_MAGNUM_MagnumFontConverter_DEPENDENCIES Trade TgaImageConverter) # and below set(_MAGNUM_ObjImporter_DEPENDENCIES MeshTools) # and below foreach(_component ${_MAGNUM_PLUGIN_COMPONENTS}) if(_component MATCHES ".+AudioImporter") @@ -560,6 +562,13 @@ foreach(_component ${_MAGNUM_PLUGIN_COMPONENTS}) endif() endforeach() +# MagnumFont and MagnumFontConverter, available only on a deprecated build +if(MAGNUM_BUILD_DEPRECATED) + list(APPEND _MAGNUM_PLUGIN_COMPONENTS MagnumFont MagnumFontConverter) + set(_MAGNUM_MagnumFont_DEPENDENCIES Trade TgaImporter GL Text TextureTools) + set(_MAGNUM_MagnumFontConverter_DEPENDENCIES Trade TgaImageConverter Text TextureTools) +endif() + # Ensure that all inter-component dependencies are specified as well set(_MAGNUM_ADDITIONAL_COMPONENTS ) foreach(_component ${Magnum_FIND_COMPONENTS}) @@ -1095,8 +1104,6 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) # No special setup for AnyImageConverter plugin # No special setup for AnyImageImporter plugin # No special setup for AnySceneImporter plugin - # No special setup for MagnumFont plugin - # No special setup for MagnumFontConverter plugin # No special setup for ObjImporter plugin # No special setup for TgaImageConverter plugin # No special setup for TgaImporter plugin