2020-03-03 23:24:39 +00:00
|
|
|
# Copyright 2019-2020, Collabora, Ltd.
|
2019-04-18 12:02:30 +00:00
|
|
|
# SPDX-License-Identifier: BSL-1.0
|
|
|
|
|
2020-06-01 08:54:15 +00:00
|
|
|
###
|
|
|
|
# Main code
|
|
|
|
#
|
|
|
|
|
2019-04-18 12:02:30 +00:00
|
|
|
set(OXR_SOURCE_FILES
|
|
|
|
oxr_api_action.c
|
|
|
|
oxr_api_funcs.h
|
|
|
|
oxr_api_instance.c
|
|
|
|
oxr_api_negotiate.c
|
|
|
|
oxr_api_session.c
|
|
|
|
oxr_api_space.c
|
|
|
|
oxr_api_swapchain.c
|
|
|
|
oxr_api_system.c
|
|
|
|
oxr_api_verify.h
|
2019-09-02 21:04:13 +00:00
|
|
|
oxr_binding.c
|
2019-06-03 19:12:01 +00:00
|
|
|
oxr_chain.h
|
2019-10-08 14:35:16 +00:00
|
|
|
oxr_event.c
|
2019-08-19 17:37:50 +00:00
|
|
|
oxr_extension_support.h
|
2019-04-18 12:02:30 +00:00
|
|
|
oxr_handle_base.c
|
2019-05-07 12:47:18 +00:00
|
|
|
oxr_input.c
|
2020-06-15 15:58:48 +00:00
|
|
|
oxr_input_transform.c
|
|
|
|
oxr_input_transform.h
|
2019-04-18 12:02:30 +00:00
|
|
|
oxr_instance.c
|
2019-10-08 14:35:16 +00:00
|
|
|
oxr_logger.c
|
2019-04-18 12:02:30 +00:00
|
|
|
oxr_logger.h
|
|
|
|
oxr_objects.h
|
|
|
|
oxr_path.c
|
|
|
|
oxr_session.c
|
2021-06-20 14:01:49 +00:00
|
|
|
oxr_session_frame_end.c
|
2019-04-18 12:02:30 +00:00
|
|
|
oxr_space.c
|
|
|
|
oxr_swapchain.c
|
|
|
|
oxr_system.c
|
|
|
|
oxr_two_call.h
|
2019-10-08 14:40:40 +00:00
|
|
|
oxr_verify.c
|
2019-05-07 12:47:18 +00:00
|
|
|
oxr_xdev.c
|
2019-04-18 12:02:30 +00:00
|
|
|
)
|
|
|
|
|
2020-07-16 10:17:30 +00:00
|
|
|
if(XRT_HAVE_VULKAN)
|
|
|
|
list(APPEND OXR_SOURCE_FILES
|
2021-06-20 13:53:40 +00:00
|
|
|
oxr_session_gfx_vk.c
|
2020-07-16 10:17:30 +00:00
|
|
|
oxr_swapchain_vk.c
|
|
|
|
oxr_vulkan.c
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_HAVE_OPENGL)
|
2020-07-16 22:22:59 +00:00
|
|
|
add_definitions(-DXR_USE_GRAPHICS_API_OPENGL)
|
|
|
|
endif()
|
|
|
|
if(XRT_HAVE_OPENGLES)
|
|
|
|
add_definitions(-DXR_USE_GRAPHICS_API_OPENGL_ES)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(XRT_HAVE_OPENGL OR XRT_HAVE_OPENGLES)
|
2019-12-03 22:33:16 +00:00
|
|
|
list(APPEND OXR_SOURCE_FILES
|
2021-06-20 13:53:40 +00:00
|
|
|
oxr_session_gfx_gl.c
|
2019-12-03 22:33:16 +00:00
|
|
|
oxr_swapchain_gl.c
|
|
|
|
)
|
2019-12-03 23:40:38 +00:00
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_HAVE_XLIB)
|
2019-12-03 23:40:38 +00:00
|
|
|
add_definitions(-DXR_USE_PLATFORM_XLIB)
|
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_HAVE_EGL)
|
2019-12-03 23:40:38 +00:00
|
|
|
add_definitions(-DXR_USE_PLATFORM_EGL)
|
2021-06-20 13:53:40 +00:00
|
|
|
list(APPEND OXR_SOURCE_FILES
|
|
|
|
oxr_session_gfx_egl.c
|
|
|
|
)
|
2019-12-03 23:40:38 +00:00
|
|
|
endif()
|
|
|
|
|
2020-07-16 22:24:02 +00:00
|
|
|
|
|
|
|
if(ANDROID)
|
|
|
|
add_definitions(-DXR_USE_PLATFORM_ANDROID)
|
2020-08-14 23:07:14 +00:00
|
|
|
list(APPEND OXR_SOURCE_FILES
|
2021-06-20 13:53:40 +00:00
|
|
|
oxr_session_gfx_gles_android.c
|
2020-08-14 23:07:14 +00:00
|
|
|
)
|
2020-07-16 22:24:02 +00:00
|
|
|
endif()
|
|
|
|
|
2020-03-03 23:24:39 +00:00
|
|
|
add_library(st_oxr STATIC ${OXR_SOURCE_FILES})
|
2020-06-01 08:54:15 +00:00
|
|
|
target_link_libraries(st_oxr PRIVATE
|
|
|
|
xrt-interfaces
|
|
|
|
xrt-external-openxr
|
|
|
|
aux_util
|
|
|
|
aux_math
|
2020-12-15 22:14:27 +00:00
|
|
|
aux_generated_bindings
|
2020-06-01 08:54:15 +00:00
|
|
|
comp_client
|
2021-01-12 00:41:27 +00:00
|
|
|
aux-includes
|
2020-07-16 03:10:37 +00:00
|
|
|
PUBLIC
|
|
|
|
aux_os
|
2020-06-01 08:54:15 +00:00
|
|
|
)
|
2020-07-16 10:17:30 +00:00
|
|
|
if(XRT_HAVE_VULKAN)
|
2021-06-08 17:02:59 +00:00
|
|
|
target_link_libraries(st_oxr PUBLIC Vulkan::Vulkan)
|
2020-07-16 10:17:30 +00:00
|
|
|
endif()
|
2020-08-14 23:07:14 +00:00
|
|
|
if(XRT_HAVE_OPENGL OR XRT_HAVE_OPENGLES)
|
2021-06-08 17:02:59 +00:00
|
|
|
target_link_libraries(st_oxr PUBLIC aux_ogl)
|
2020-08-14 23:07:14 +00:00
|
|
|
endif()
|
2020-08-19 20:56:38 +00:00
|
|
|
if(ANDROID)
|
|
|
|
target_link_libraries(st_oxr PRIVATE aux_android)
|
|
|
|
endif()
|
2020-06-15 15:58:48 +00:00
|
|
|
target_include_directories(st_oxr
|
|
|
|
PRIVATE
|
2020-06-01 08:54:15 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2020-06-15 15:58:48 +00:00
|
|
|
INTERFACE
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/..)
|