diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-03-28 14:10:28 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-03-28 16:48:15 +0200 |
commit | 5fe6984639b5db9efa14103698e489040315ebfb (patch) | |
tree | 11a76ba5ab636182d0b0a334bb2ada196ef86e98 /modules/navigation | |
parent | 41d075de5865c8b088c83219431661bc2d1f1802 (diff) |
Modules: Don't build editor-specific classes in templates
They're moved to an `editor` subfolder so that we can easily handle them
separately.
Diffstat (limited to 'modules/navigation')
-rw-r--r-- | modules/navigation/SCsub | 2 | ||||
-rw-r--r-- | modules/navigation/editor/navigation_mesh_editor_plugin.cpp (renamed from modules/navigation/navigation_mesh_editor_plugin.cpp) | 7 | ||||
-rw-r--r-- | modules/navigation/editor/navigation_mesh_editor_plugin.h (renamed from modules/navigation/navigation_mesh_editor_plugin.h) | 4 | ||||
-rw-r--r-- | modules/navigation/register_types.cpp | 2 |
4 files changed, 9 insertions, 6 deletions
diff --git a/modules/navigation/SCsub b/modules/navigation/SCsub index 22b5509b32..24a6b12639 100644 --- a/modules/navigation/SCsub +++ b/modules/navigation/SCsub @@ -57,6 +57,8 @@ env.modules_sources += thirdparty_obj module_obj = [] env_navigation.add_source_files(module_obj, "*.cpp") +if env["tools"]: + env_navigation.add_source_files(module_obj, "editor/*.cpp") env.modules_sources += module_obj # Needed to force rebuilding the module files when the thirdparty library is updated. diff --git a/modules/navigation/navigation_mesh_editor_plugin.cpp b/modules/navigation/editor/navigation_mesh_editor_plugin.cpp index 511490ba07..c243e3e6e3 100644 --- a/modules/navigation/navigation_mesh_editor_plugin.cpp +++ b/modules/navigation/editor/navigation_mesh_editor_plugin.cpp @@ -28,13 +28,14 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef TOOLS_ENABLED #include "navigation_mesh_editor_plugin.h" +#ifdef TOOLS_ENABLED + +#include "../navigation_mesh_generator.h" #include "core/io/marshalls.h" #include "core/io/resource_saver.h" #include "editor/editor_node.h" -#include "navigation_mesh_generator.h" #include "scene/3d/mesh_instance_3d.h" #include "scene/gui/box_container.h" @@ -153,4 +154,4 @@ NavigationMeshEditorPlugin::NavigationMeshEditorPlugin() { NavigationMeshEditorPlugin::~NavigationMeshEditorPlugin() { } -#endif +#endif // TOOLS_ENABLED diff --git a/modules/navigation/navigation_mesh_editor_plugin.h b/modules/navigation/editor/navigation_mesh_editor_plugin.h index d581b453b3..3c3e804fd2 100644 --- a/modules/navigation/navigation_mesh_editor_plugin.h +++ b/modules/navigation/editor/navigation_mesh_editor_plugin.h @@ -81,6 +81,6 @@ public: ~NavigationMeshEditorPlugin(); }; -#endif +#endif // TOOLS_ENABLED -#endif +#endif // NAVIGATION_MESH_EDITOR_PLUGIN_H diff --git a/modules/navigation/register_types.cpp b/modules/navigation/register_types.cpp index e2264e843c..218f2c2937 100644 --- a/modules/navigation/register_types.cpp +++ b/modules/navigation/register_types.cpp @@ -40,7 +40,7 @@ #endif #ifdef TOOLS_ENABLED -#include "navigation_mesh_editor_plugin.h" +#include "editor/navigation_mesh_editor_plugin.h" #endif #ifndef _3D_DISABLED |