Cleanup of OpenXR module scons config

This commit is contained in:
Bastiaan Olij 2023-12-27 14:49:25 +11:00
parent 4b6ad34988
commit 82a36cf31b
12 changed files with 60 additions and 46 deletions

View File

@ -93,38 +93,14 @@ if env["builtin_openxr"]:
module_obj = []
env_openxr.add_source_files(module_obj, "*.cpp")
env_openxr.add_source_files(module_obj, "action_map/*.cpp")
env_openxr.add_source_files(module_obj, "scene/*.cpp")
# We're a little more targeted with our extensions
if env["platform"] == "android":
env_openxr.add_source_files(module_obj, "extensions/openxr_android_extension.cpp")
if env["vulkan"]:
env_openxr.add_source_files(module_obj, "extensions/openxr_vulkan_extension.cpp")
if env["opengl3"] and env["platform"] != "macos":
env_openxr.add_source_files(module_obj, "extensions/openxr_opengl_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_local_floor_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_palm_pose_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_composition_layer_depth_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_eye_gaze_interaction.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_htc_controller_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_htc_vive_tracker_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_huawei_controller_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_hand_tracking_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_fb_foveation_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_fb_update_swapchain_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_fb_passthrough_extension_wrapper.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_fb_display_refresh_rate_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_pico_controller_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_wmr_controller_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_ml2_controller_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_extension_wrapper_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_api_extension.cpp")
env_openxr.add_source_files(module_obj, "extensions/openxr_meta_controller_extension.cpp")
env.modules_sources += module_obj
Export("env_openxr")
SConscript("action_map/SCsub")
SConscript("extensions/SCsub")
SConscript("scene/SCsub")
if env.editor_build:
SConscript("editor/SCsub")

View File

@ -0,0 +1,10 @@
#!/usr/bin/env python
Import("env")
Import("env_openxr")
module_obj = []
env_openxr.add_source_files(module_obj, "*.cpp")
env.modules_sources += module_obj

View File

@ -0,0 +1,18 @@
#!/usr/bin/env python
Import("env")
Import("env_openxr")
module_obj = []
env_openxr.add_source_files(module_obj, "*.cpp")
# These are platform dependent
if env["platform"] == "android":
env_openxr.add_source_files(module_obj, "platform/openxr_android_extension.cpp")
if env["vulkan"]:
env_openxr.add_source_files(module_obj, "platform/openxr_vulkan_extension.cpp")
if env["opengl3"] and env["platform"] != "macos":
env_openxr.add_source_files(module_obj, "platform/openxr_opengl_extension.cpp")
env.modules_sources += module_obj

View File

@ -30,7 +30,7 @@
#include "openxr_android_extension.h"
#include "../openxr_api.h"
#include "../../openxr_api.h"
#include "java_godot_wrapper.h"
#include "os_android.h"

View File

@ -31,8 +31,8 @@
#ifndef OPENXR_ANDROID_EXTENSION_H
#define OPENXR_ANDROID_EXTENSION_H
#include "../util.h"
#include "openxr_extension_wrapper.h"
#include "../../util.h"
#include "../openxr_extension_wrapper.h"
class OpenXRAndroidExtension : public OpenXRExtensionWrapper {
public:

View File

@ -32,7 +32,7 @@
#ifdef GLES3_ENABLED
#include "../openxr_util.h"
#include "../../openxr_util.h"
#include "drivers/gles3/effects/copy_effects.h"
#include "drivers/gles3/storage/texture_storage.h"

View File

@ -33,14 +33,14 @@
#ifdef GLES3_ENABLED
#include "../openxr_api.h"
#include "../util.h"
#include "openxr_extension_wrapper.h"
#include "../../openxr_api.h"
#include "../../util.h"
#include "../openxr_extension_wrapper.h"
#include "core/templates/vector.h"
// Always include this as late as possible.
#include "../openxr_platform_inc.h"
#include "../../openxr_platform_inc.h"
class OpenXROpenGLExtension : public OpenXRGraphicsExtensionWrapper {
public:

View File

@ -30,7 +30,7 @@
#include "openxr_vulkan_extension.h"
#include "../openxr_util.h"
#include "../../openxr_util.h"
#include "core/string/print_string.h"
#include "servers/rendering/renderer_rd/effects/copy_effects.h"

View File

@ -31,14 +31,14 @@
#ifndef OPENXR_VULKAN_EXTENSION_H
#define OPENXR_VULKAN_EXTENSION_H
#include "../openxr_api.h"
#include "../util.h"
#include "openxr_extension_wrapper.h"
#include "../../openxr_api.h"
#include "../../util.h"
#include "../openxr_extension_wrapper.h"
#include "core/templates/vector.h"
// Always include this as late as possible.
#include "../openxr_platform_inc.h"
#include "../../openxr_platform_inc.h"
class OpenXRVulkanExtension : public OpenXRGraphicsExtensionWrapper, VulkanHooks {
public:

View File

@ -46,11 +46,11 @@
#include "openxr_platform_inc.h"
#ifdef VULKAN_ENABLED
#include "extensions/openxr_vulkan_extension.h"
#include "extensions/platform/openxr_vulkan_extension.h"
#endif
#if defined(GLES3_ENABLED) && !defined(MACOS_ENABLED)
#include "extensions/openxr_opengl_extension.h"
#include "extensions/platform/openxr_opengl_extension.h"
#endif
#include "extensions/openxr_composition_layer_depth_extension.h"

View File

@ -61,7 +61,7 @@
#endif
#ifdef ANDROID_ENABLED
#include "extensions/openxr_android_extension.h"
#include "extensions/platform/openxr_android_extension.h"
#endif
#include "core/config/project_settings.h"

View File

@ -0,0 +1,10 @@
#!/usr/bin/env python
Import("env")
Import("env_openxr")
module_obj = []
env_openxr.add_source_files(module_obj, "*.cpp")
env.modules_sources += module_obj