From 57375a2b10f17d671f25b0695a5ba4db0a986a7f Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Mon, 15 May 2023 13:41:11 -0700 Subject: [PATCH 1/3] add additional magnum importer plugins to python build dependencies --- src/cmake/dependencies.cmake | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/src/cmake/dependencies.cmake b/src/cmake/dependencies.cmake index 6a490cbd90..feee93da90 100644 --- a/src/cmake/dependencies.cmake +++ b/src/cmake/dependencies.cmake @@ -350,14 +350,33 @@ if(NOT USE_SYSTEM_MAGNUM) # for Python as well; and reset that back to strange build procedures that # turn some features off again later can still work. if(BUILD_GUI_VIEWERS) - set(MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS - MagnumPlugins::StbTrueTypeFont Magnum::AnySceneImporter - MagnumPlugins::AssimpImporter CACHE STRING "" FORCE + set( + MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS + MagnumPlugins::StbTrueTypeFont + Magnum::AnySceneImporter + Magnum::AnyImageImporter + Magnum::AnyImageConverter + MagnumPlugins::StbImageImporter + MagnumPlugins::StbImageConverter + MagnumPlugins::BasisImporter + MagnumPlugins::StanfordImporter + MagnumPlugins::GltfImporter + MagnumPlugins::AssimpImporter + CACHE STRING "" FORCE ) else() - set(MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS Magnum::AnySceneImporter - MagnumPlugins::AssimpImporter - CACHE STRING "" FORCE + set( + MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS + Magnum::AnySceneImporter + MagnumPlugins::AssimpImporter + Magnum::AnyImageImporter + Magnum::AnyImageConverter + MagnumPlugins::StbImageImporter + MagnumPlugins::StbImageConverter + MagnumPlugins::BasisImporter + MagnumPlugins::StanfordImporter + MagnumPlugins::GltfImporter + CACHE STRING "" FORCE ) endif() add_subdirectory("${DEPS_DIR}/magnum-bindings") From 2344efb4a40ceeccdc26cd0afcd65ee52450e15d Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Mon, 15 May 2023 13:54:47 -0700 Subject: [PATCH 2/3] refactor to reduce redundancy --- src/cmake/dependencies.cmake | 42 ++++++++++++++---------------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/src/cmake/dependencies.cmake b/src/cmake/dependencies.cmake index feee93da90..425544089a 100644 --- a/src/cmake/dependencies.cmake +++ b/src/cmake/dependencies.cmake @@ -349,35 +349,25 @@ if(NOT USE_SYSTEM_MAGNUM) # Make Magnum text rendering plugins (used by the native viewer) available # for Python as well; and reset that back to strange build procedures that # turn some features off again later can still work. + set( + common_plugins + Magnum::AnyImageConverter + Magnum::AnyImageImporter + Magnum::AnySceneImporter + MagnumPlugins::AssimpImporter + MagnumPlugins::BasisImporter + MagnumPlugins::GltfImporter + MagnumPlugins::StanfordImporter + MagnumPlugins::StbImageConverter + MagnumPlugins::StbImageImporter + ) if(BUILD_GUI_VIEWERS) - set( - MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS - MagnumPlugins::StbTrueTypeFont - Magnum::AnySceneImporter - Magnum::AnyImageImporter - Magnum::AnyImageConverter - MagnumPlugins::StbImageImporter - MagnumPlugins::StbImageConverter - MagnumPlugins::BasisImporter - MagnumPlugins::StanfordImporter - MagnumPlugins::GltfImporter - MagnumPlugins::AssimpImporter - CACHE STRING "" FORCE + set(MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS ${common_plugins} + MagnumPlugins::StbTrueTypeFont + CACHE STRING "" FORCE ) else() - set( - MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS - Magnum::AnySceneImporter - MagnumPlugins::AssimpImporter - Magnum::AnyImageImporter - Magnum::AnyImageConverter - MagnumPlugins::StbImageImporter - MagnumPlugins::StbImageConverter - MagnumPlugins::BasisImporter - MagnumPlugins::StanfordImporter - MagnumPlugins::GltfImporter - CACHE STRING "" FORCE - ) + set(MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS ${common_plugins} CACHE STRING "" FORCE) endif() add_subdirectory("${DEPS_DIR}/magnum-bindings") endif() From 138e934706b7e2eb8571642d6b4ce238553097fe Mon Sep 17 00:00:00 2001 From: aclegg3 Date: Tue, 16 May 2023 08:28:25 -0700 Subject: [PATCH 3/3] remove StanfordImporter as it doesn't support ASCII ply. --- src/cmake/dependencies.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cmake/dependencies.cmake b/src/cmake/dependencies.cmake index 425544089a..a835c34039 100644 --- a/src/cmake/dependencies.cmake +++ b/src/cmake/dependencies.cmake @@ -357,7 +357,6 @@ if(NOT USE_SYSTEM_MAGNUM) MagnumPlugins::AssimpImporter MagnumPlugins::BasisImporter MagnumPlugins::GltfImporter - MagnumPlugins::StanfordImporter MagnumPlugins::StbImageConverter MagnumPlugins::StbImageImporter )