mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-29 18:08:29 +00:00
cmake: refactor XRT_FEATURE_OPENXR* options
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2140>
This commit is contained in:
parent
4a6f62fe65
commit
393a08600e
153
CMakeLists.txt
153
CMakeLists.txt
|
@ -341,130 +341,55 @@ set(XRT_IPC_MSG_SOCK_FILENAME monado_comp_ipc CACHE STRING "Service socket filen
|
|||
set(XRT_IPC_SERVICE_PID_FILENAME monado.pid CACHE STRING "Service pidfile filename")
|
||||
set(XRT_OXR_RUNTIME_SUFFIX monado CACHE STRING "OpenXR client library suffix")
|
||||
|
||||
# cmake-format: on
|
||||
|
||||
# Most users won't touch these.
|
||||
mark_as_advanced(XRT_MODULE_COMPOSITOR_MAIN XRT_MODULE_COMPOSITOR_NULL XRT_FEATURE_OPENXR)
|
||||
|
||||
# Misc extension support.
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_DISPLAY_REFRESH_RATE)
|
||||
set(XRT_FEATURE_OPENXR_DISPLAY_REFRESH_RATE ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_FORCE_FEEDBACK_CURL)
|
||||
set(XRT_FEATURE_OPENXR_FORCE_FEEDBACK_CURL ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_HEADLESS)
|
||||
set(XRT_FEATURE_OPENXR_HEADLESS ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_OVERLAY)
|
||||
set(XRT_FEATURE_OPENXR_OVERLAY ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_VISIBILITY_MASK)
|
||||
set(XRT_FEATURE_OPENXR_VISIBILITY_MASK ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_PERFORMANCE_SETTINGS)
|
||||
set(XRT_FEATURE_OPENXR_PERFORMANCE_SETTINGS OFF)
|
||||
endif()
|
||||
option(
|
||||
XRT_FEATURE_OPENXR_VULKAN_SWAPCHAIN_FORMAT_LIST
|
||||
"Enable support for the XR_KHR_vulkan_swapchain_format_list extension" ON
|
||||
)
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_FACIAL_TRACKING_HTC)
|
||||
set(XRT_FEATURE_OPENXR_FACIAL_TRACKING_HTC OFF)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_BODY_TRACKING_FB)
|
||||
set(XRT_FEATURE_OPENXR_BODY_TRACKING_FB OFF)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_XDEV_SPACE)
|
||||
set(XRT_FEATURE_OPENXR_XDEV_SPACE ON)
|
||||
endif()
|
||||
option(XRT_FEATURE_OPENXR_DISPLAY_REFRESH_RATE "Enable XR_FB_display_refresh_rate" ON)
|
||||
option(XRT_FEATURE_OPENXR_FORCE_FEEDBACK_CURL "Enable XR_MNDX_force_feedback_curl" ON)
|
||||
option(XRT_FEATURE_OPENXR_HEADLESS "Enable XR_MND_headless" ON)
|
||||
option(XRT_FEATURE_OPENXR_OVERLAY "Enable XR_EXTX_overlay" ON)
|
||||
option(XRT_FEATURE_OPENXR_VISIBILITY_MASK "Enable XR_KHR_visibility_mask" ON)
|
||||
option(XRT_FEATURE_OPENXR_PERFORMANCE_SETTINGS "Enable XR_EXT_performance_settings" OFF)
|
||||
option(XRT_FEATURE_OPENXR_VULKAN_SWAPCHAIN_FORMAT_LIST "Enable XR_KHR_vulkan_swapchain_format_list" ON)
|
||||
option(XRT_FEATURE_OPENXR_FACIAL_TRACKING_HTC "Enable XR_HTC_facial_tracking" OFF)
|
||||
option(XRT_FEATURE_OPENXR_BODY_TRACKING_FB "Enable XR_FB_body_tracking" OFF)
|
||||
option(XRT_FEATURE_OPENXR_XDEV_SPACE "Enable XR_MNDX_xdev_space" ON)
|
||||
|
||||
# Interaction extension support.
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_EXT_EYE_GAZE)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_EXT_EYE_GAZE ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_EXT_HAND)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_EXT_HAND ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_EXT_PALM_POSE)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_EXT_PALM_POSE OFF)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_ML2)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_ML2 ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_MNDX)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_MNDX ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_MSFT_HAND)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_MSFT_HAND OFF)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_OPPO)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_OPPO ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_WINMR)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_WINMR ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_BYTEDANCE)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_BYTEDANCE ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_VIVE_COSMOS)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_VIVE_COSMOS ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_VIVE_FOCUS3)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_VIVE_FOCUS3 ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_FB_PROXIMITY)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_FB_PROXIMITY ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_TOUCH_PRO)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_TOUCH_PRO ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_TOUCH_PLUS)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_TOUCH_PLUS ON)
|
||||
endif()
|
||||
option(XRT_FEATURE_OPENXR_INTERACTION_EXT_EYE_GAZE "Enable XR_EXT_eye_gaze_interaction" ON)
|
||||
option(XRT_FEATURE_OPENXR_INTERACTION_EXT_HAND "Enable XR_EXT_hand_interaction" ON)
|
||||
option(XRT_FEATURE_OPENXR_INTERACTION_EXT_PALM_POSE "Enable XR_EXT_palm_pose" OFF)
|
||||
option(XRT_FEATURE_OPENXR_INTERACTION_ML2 "Enable XR_ML_ml2_controller_interaction" ON)
|
||||
option(XRT_FEATURE_OPENXR_INTERACTION_MNDX "Enable XR_MNDX_ball_on_a_stick_controller, XR_MNDX_hydra and XR_MNDX_system_buttons" ON)
|
||||
option(XRT_FEATURE_OPENXR_INTERACTION_MSFT_HAND "Enable XR_MSFT_hand_interaction" OFF)
|
||||
option(XRT_FEATURE_OPENXR_INTERACTION_OPPO "Enable XR_OPPO_controller_interaction" ON)
|
||||
option(XRT_FEATURE_OPENXR_INTERACTION_WINMR "Enable XR_EXT_hp_mixed_reality_controller and XR_EXT_samsung_odyssey_controller" ON)
|
||||
option(XRT_FEATURE_OPENXR_INTERACTION_BYTEDANCE "Enable XR_BD_controller_interaction" ON)
|
||||
option(XRT_FEATURE_OPENXR_INTERACTION_VIVE_COSMOS "Enable XR_HTC_vive_cosmos_controller_interaction" ON)
|
||||
option(XRT_FEATURE_OPENXR_INTERACTION_VIVE_FOCUS3 "Enable XR_HTC_vive_focus3_controller_interaction" ON)
|
||||
option(XRT_FEATURE_OPENXR_INTERACTION_FB_PROXIMITY "Enable XR_FB_touch_controller_proximity" ON)
|
||||
option(XRT_FEATURE_OPENXR_INTERACTION_TOUCH_PRO "Enable XR_FB_touch_controller_pro" ON)
|
||||
option(XRT_FEATURE_OPENXR_INTERACTION_TOUCH_PLUS "Enable XR_META_touch_controller_plus" ON)
|
||||
|
||||
# Defaults for OpenXR layer support
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_DEPTH)
|
||||
set(XRT_FEATURE_OPENXR_LAYER_DEPTH ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_COLOR_SCALE_BIAS)
|
||||
set(XRT_FEATURE_OPENXR_LAYER_COLOR_SCALE_BIAS OFF)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_CUBE)
|
||||
set(XRT_FEATURE_OPENXR_LAYER_CUBE OFF)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_CYLINDER)
|
||||
set(XRT_FEATURE_OPENXR_LAYER_CYLINDER ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_EQUIRECT2)
|
||||
set(XRT_FEATURE_OPENXR_LAYER_EQUIRECT2 ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_EQUIRECT1)
|
||||
set(XRT_FEATURE_OPENXR_LAYER_EQUIRECT1 OFF)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_FB_ALPHA_BLEND)
|
||||
set(XRT_FEATURE_OPENXR_LAYER_FB_ALPHA_BLEND OFF)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_FB_IMAGE_LAYOUT)
|
||||
set(XRT_FEATURE_OPENXR_LAYER_FB_IMAGE_LAYOUT OFF)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_FB_SETTINGS)
|
||||
set(XRT_FEATURE_OPENXR_LAYER_FB_SETTINGS OFF)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_FB_DEPTH_TEST)
|
||||
set(XRT_FEATURE_OPENXR_LAYER_FB_DEPTH_TEST OFF)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_PASSTHROUGH)
|
||||
set(XRT_FEATURE_OPENXR_LAYER_PASSTHROUGH OFF)
|
||||
endif()
|
||||
option(XRT_FEATURE_OPENXR_LAYER_DEPTH "Enable XR_KHR_composition_layer_depth" ON)
|
||||
option(XRT_FEATURE_OPENXR_LAYER_COLOR_SCALE_BIAS "Enable XR_KHR_composition_layer_color_scale_bias" OFF)
|
||||
option(XRT_FEATURE_OPENXR_LAYER_CUBE "Enable XR_KHR_composition_layer_cube" OFF)
|
||||
option(XRT_FEATURE_OPENXR_LAYER_CYLINDER "Enable XR_KHR_composition_layer_cylinder" ON)
|
||||
option(XRT_FEATURE_OPENXR_LAYER_EQUIRECT2 "Enable XR_KHR_composition_layer_equirect2" ON)
|
||||
option(XRT_FEATURE_OPENXR_LAYER_EQUIRECT1 "Enable XR_KHR_composition_layer_equirect" OFF)
|
||||
option(XRT_FEATURE_OPENXR_LAYER_FB_ALPHA_BLEND "Enable XR_FB_composition_layer_alpha_blend" OFF)
|
||||
option(XRT_FEATURE_OPENXR_LAYER_FB_IMAGE_LAYOUT "Enable XR_FB_composition_layer_image_layout" OFF)
|
||||
option(XRT_FEATURE_OPENXR_LAYER_FB_SETTINGS "Enable XR_FB_composition_layer_settings" OFF)
|
||||
option(XRT_FEATURE_OPENXR_LAYER_FB_DEPTH_TEST "Enable XR_FB_composition_layer_depth_test" OFF)
|
||||
option(XRT_FEATURE_OPENXR_LAYER_PASSTHROUGH "Enable XR_FB_passthrough" OFF)
|
||||
|
||||
# Defaults for OpenXR spaces
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_SPACE_LOCAL_FLOOR)
|
||||
set(XRT_FEATURE_OPENXR_SPACE_LOCAL_FLOOR ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_SPACE_UNBOUNDED)
|
||||
set(XRT_FEATURE_OPENXR_SPACE_UNBOUNDED ON)
|
||||
endif()
|
||||
option(XRT_FEATURE_OPENXR_SPACE_LOCAL_FLOOR "Enable XR_EXT_local_floor" ON)
|
||||
option(XRT_FEATURE_OPENXR_SPACE_UNBOUNDED "Enable XR_MSFT_unbounded_reference_space" ON)
|
||||
|
||||
# cmake-format: on
|
||||
|
||||
# You can set this from a superproject to add a driver
|
||||
# All drivers must be listed in here to be included in the generated header!
|
||||
|
|
Loading…
Reference in a new issue