2020-03-31 19:59:02 +00:00
|
|
|
# Copyright 2019-2020, Collabora, Ltd.
|
2019-09-24 13:43:43 +00:00
|
|
|
# SPDX-License-Identifier: BSL-1.0
|
|
|
|
|
2020-06-01 08:54:15 +00:00
|
|
|
|
|
|
|
###
|
|
|
|
# Binding generation
|
|
|
|
#
|
|
|
|
|
|
|
|
prog_python = import('python').find_installation('python3')
|
|
|
|
|
|
|
|
generated = custom_target('bindings code',
|
|
|
|
command: [prog_python, '@INPUT@', '@OUTPUT@'],
|
|
|
|
input: ['bindings.py', 'bindings.json'],
|
|
|
|
output: [
|
|
|
|
'oxr_generated_bindings.h',
|
|
|
|
'oxr_generated_bindings.c',
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
###
|
|
|
|
# Main code
|
|
|
|
#
|
|
|
|
|
2019-12-03 23:40:38 +00:00
|
|
|
compile_args = []
|
2020-01-14 18:21:23 +00:00
|
|
|
if build_opengl
|
2019-12-03 23:40:38 +00:00
|
|
|
compile_args += ['-DXR_USE_GRAPHICS_API_OPENGL', '-DXR_USE_GRAPHICS_API_OPENGL_ES']
|
|
|
|
endif
|
|
|
|
|
2020-01-14 18:21:23 +00:00
|
|
|
if build_egl
|
2019-12-03 23:40:38 +00:00
|
|
|
compile_args += ['-DXR_USE_PLATFORM_EGL']
|
|
|
|
endif
|
|
|
|
|
2020-01-14 18:21:23 +00:00
|
|
|
if build_xlib
|
2019-12-03 23:40:38 +00:00
|
|
|
compile_args += ['-DXR_USE_PLATFORM_XLIB']
|
|
|
|
endif
|
|
|
|
|
2019-09-24 13:43:43 +00:00
|
|
|
lib_st_oxr = static_library(
|
|
|
|
'st_oxr',
|
2020-06-01 08:54:15 +00:00
|
|
|
[
|
|
|
|
generated[0],
|
|
|
|
generated[1],
|
2019-09-24 13:43:43 +00:00
|
|
|
'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',
|
|
|
|
'oxr_binding.c',
|
|
|
|
'oxr_chain.h',
|
2019-10-08 14:28:15 +00:00
|
|
|
'oxr_event.c',
|
2019-09-24 13:43:43 +00:00
|
|
|
'oxr_extension_support.h',
|
|
|
|
'oxr_handle_base.c',
|
|
|
|
'oxr_input.c',
|
|
|
|
'oxr_instance.c',
|
2019-10-08 14:35:16 +00:00
|
|
|
'oxr_logger.c',
|
2019-09-24 13:43:43 +00:00
|
|
|
'oxr_logger.h',
|
|
|
|
'oxr_objects.h',
|
|
|
|
'oxr_path.c',
|
|
|
|
'oxr_session.c',
|
|
|
|
'oxr_session_gl.c',
|
2019-10-29 16:11:48 +00:00
|
|
|
'oxr_session_egl.c',
|
2019-09-24 13:43:43 +00:00
|
|
|
'oxr_session_vk.c',
|
|
|
|
'oxr_space.c',
|
|
|
|
'oxr_swapchain.c',
|
|
|
|
'oxr_swapchain_gl.c',
|
|
|
|
'oxr_swapchain_vk.c',
|
|
|
|
'oxr_system.c',
|
|
|
|
'oxr_two_call.h',
|
2019-10-08 14:40:40 +00:00
|
|
|
'oxr_verify.c',
|
2019-09-24 13:43:43 +00:00
|
|
|
'oxr_vulkan.c',
|
|
|
|
'oxr_xdev.c',
|
2020-06-01 08:54:15 +00:00
|
|
|
],
|
2019-09-24 13:43:43 +00:00
|
|
|
include_directories: [
|
|
|
|
xrt_include,
|
2020-03-31 19:59:02 +00:00
|
|
|
openxr_include,
|
2019-09-24 13:43:43 +00:00
|
|
|
],
|
|
|
|
dependencies: [aux, vulkan],
|
2019-12-03 23:40:38 +00:00
|
|
|
c_args: compile_args,
|
|
|
|
cpp_args: compile_args,
|
2019-09-24 13:43:43 +00:00
|
|
|
)
|