build: Remove meson files

This commit is contained in:
Jakob Bornecrantz 2022-03-09 22:54:33 +00:00 committed by Jakob Bornecrantz
parent bc89a23280
commit 175ff58f10
37 changed files with 6 additions and 2928 deletions

View file

@ -80,7 +80,7 @@ debian:bullseye:container_prep:
- .monado.variables.debian:bullseye
- .fdo.container-build@debian # from ci-templates
variables:
FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates clang-format cmake codespell curl debhelper devscripts doxygen dput-ng gettext-base git glslang-tools graphviz libavcodec-dev libbsd-dev libcjson-dev libdbus-1-dev libegl1-mesa-dev libeigen3-dev libgl1-mesa-dev libglvnd-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libhidapi-dev libopencv-dev libsdl2-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libuvc-dev libv4l-dev libvulkan-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev meson ninja-build pandoc patch pkg-config python3 python3-click python3-pip unzip wget'
FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates clang-format cmake codespell curl debhelper devscripts doxygen dput-ng gettext-base git glslang-tools graphviz libavcodec-dev libbsd-dev libcjson-dev libdbus-1-dev libegl1-mesa-dev libeigen3-dev libgl1-mesa-dev libglvnd-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libhidapi-dev libopencv-dev libsdl2-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libuvc-dev libv4l-dev libvulkan-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev ninja-build pandoc patch pkg-config python3 python3-click python3-pip unzip wget'
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/i386_and_proclamation_container_prep.sh'
# Make Debian bullseye-ndk image
@ -100,7 +100,7 @@ ubuntu:focal:container_prep:
- .monado.variables.ubuntu:focal
- .fdo.container-build@ubuntu # from ci-templates
variables:
FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates cmake curl debhelper devscripts dput-ng gettext-base git glslang-tools libavcodec-dev libbsd-dev libcjson-dev libdbus-1-dev libegl1-mesa-dev libeigen3-dev libgl1-mesa-dev libglvnd-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libhidapi-dev libopencv-dev libsdl2-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libuvc-dev libv4l-dev libvulkan-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev meson ninja-build pandoc patch pkg-config python3 unzip wget'
FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates cmake curl debhelper devscripts dput-ng gettext-base git glslang-tools libavcodec-dev libbsd-dev libcjson-dev libdbus-1-dev libegl1-mesa-dev libeigen3-dev libgl1-mesa-dev libglvnd-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libhidapi-dev libopencv-dev libsdl2-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libuvc-dev libv4l-dev libvulkan-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev ninja-build pandoc patch pkg-config python3 unzip wget'
# Make Ubuntu hirsute image
ubuntu:hirsute:container_prep:
@ -109,7 +109,7 @@ ubuntu:hirsute:container_prep:
- .monado.variables.ubuntu:hirsute
- .fdo.container-build@ubuntu # from ci-templates
variables:
FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates cmake curl debhelper devscripts dput-ng gettext-base git glslang-tools libavcodec-dev libbsd-dev libcjson-dev libdbus-1-dev libegl1-mesa-dev libeigen3-dev libgl1-mesa-dev libglvnd-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libhidapi-dev libopencv-dev libsdl2-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libuvc-dev libv4l-dev libvulkan-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev meson ninja-build pandoc patch pkg-config python3 unzip wget'
FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates cmake curl debhelper devscripts dput-ng gettext-base git glslang-tools libavcodec-dev libbsd-dev libcjson-dev libdbus-1-dev libegl1-mesa-dev libeigen3-dev libgl1-mesa-dev libglvnd-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libhidapi-dev libopencv-dev libsdl2-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libuvc-dev libv4l-dev libvulkan-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev ninja-build pandoc patch pkg-config python3 unzip wget'
# Make Ubuntu impish image
ubuntu:impish:container_prep:
@ -118,7 +118,7 @@ ubuntu:impish:container_prep:
- .monado.variables.ubuntu:impish
- .fdo.container-build@ubuntu # from ci-templates
variables:
FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates cmake curl debhelper devscripts dput-ng gettext-base git glslang-tools libavcodec-dev libbsd-dev libcjson-dev libdbus-1-dev libegl1-mesa-dev libeigen3-dev libgl1-mesa-dev libglvnd-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libhidapi-dev libopencv-dev libsdl2-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libuvc-dev libv4l-dev libvulkan-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev meson ninja-build pandoc patch pkg-config python3 reprepro unzip wget'
FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates cmake curl debhelper devscripts dput-ng gettext-base git glslang-tools libavcodec-dev libbsd-dev libcjson-dev libdbus-1-dev libegl1-mesa-dev libeigen3-dev libgl1-mesa-dev libglvnd-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libhidapi-dev libopencv-dev libsdl2-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libuvc-dev libv4l-dev libvulkan-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev ninja-build pandoc patch pkg-config python3 reprepro unzip wget'
# Make Arch rolling image
arch:rolling:container_prep:
@ -127,7 +127,7 @@ arch:rolling:container_prep:
- .monado.variables.arch:rolling
- .fdo.container-build@arch # from ci-templates
variables:
FDO_DISTRIBUTION_PACKAGES: 'check clang cmake diffutils doxygen eigen ffmpeg gcc git glfw-x11 glslang graphviz gtk3 hidapi libusb libxrandr mesa meson ninja opencv patch pkgconfig python3 qt5-base v4l-utils vulkan-headers vulkan-icd-loader'
FDO_DISTRIBUTION_PACKAGES: 'check clang cmake diffutils doxygen eigen ffmpeg gcc git glfw-x11 glslang graphviz gtk3 hidapi libusb libxrandr mesa ninja opencv patch pkgconfig python3 qt5-base v4l-utils vulkan-headers vulkan-icd-loader'
###
# Container usage base jobs
@ -273,24 +273,6 @@ debian:cmake:32bit:
- ninja -C build
- cd build && ctest --output-on-failure
debian:meson:
stage: build
extends:
- .monado.image.debian:bullseye
script:
- rm -rf build
- meson setup build .
- ninja -C build
debian:meson:32bit:
stage: build
extends:
- .monado.image.debian:bullseye
script:
- rm -rf build
- meson setup build . --prefix=/usr --libdir=/usr/lib/i386-linux-gnu --cross-file=.gitlab-ci/i386-cross.txt
- ninja -C build
ndk:armeabi-v7a:
stage: build
extends:
@ -368,15 +350,6 @@ ubuntu:cmake:
- ninja -C build
- cd build && ctest --output-on-failure
ubuntu:meson:
stage: build
extends:
- .monado.image.ubuntu:focal
script:
- rm -rf build
- meson setup build .
- ninja -C build
ubuntu:latest:cmake:
stage: build
extends:
@ -410,15 +383,6 @@ arch:cmake:clang:
- ninja -C build
- cd build && ctest --output-on-failure
arch:meson:
stage: build
extends:
- .monado.image.arch:rolling
script:
- rm -rf build
- meson setup build .
- ninja -C build
# Packaging
.monado.packaging.conditions:
rules:

View file

@ -157,16 +157,8 @@ reuse:
script:
- rm -rf build
{#- meson builds -#}
{%- if "meson" in job.name %}
- meson setup build .
{%- if job.args %} {{ job.args | join(' ') }}{% endif %}
- ninja -C build
{#- regular or NDK cmake builds -#}
{%- elif "cmake" in job.name or "ndk" in job.name %}
{%- if "cmake" in job.name or "ndk" in job.name %}
- cmake -GNinja -B build -S . {{- make_cmake_args(job.cmake_defines) }}
- echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt

View file

@ -14,7 +14,6 @@ fdo_ci_templates_sha: 34039cd573a2df832d465bc9e4c5f543571f5241
wget:
unzip:
cmake:
meson:
ninja-build:
libeigen3-dev:
curl:
@ -110,14 +109,6 @@ distributions:
# OpenCV doesn't play nicely with us in multi-arch.
XRT_HAVE_OPENCV: "OFF"
- name: "debian:meson"
- name: "debian:meson:32bit"
args:
- --prefix=/usr
- --libdir=/usr/lib/i386-linux-gnu
- --cross-file=.gitlab-ci/i386-cross.txt
# This one is pretty minimal, compared to the others.
# Though, we now install the android SDK in it...
- codename: bullseye-ndk
@ -173,8 +164,6 @@ distributions:
cmake_defines:
BUILD_DOC: "OFF"
- name: "ubuntu:meson"
- codename: hirsute
distro_version: "21.04"
tag: "2022-01-24.0"
@ -203,7 +192,6 @@ distributions:
gcc:
clang:
cmake:
meson:
ninja:
pkgconfig:
python3:
@ -234,8 +222,6 @@ distributions:
CMAKE_C_COMPILER: /usr/bin/clang
CMAKE_CXX_COMPILER: /usr/bin/clang++
- name: "arch:meson"
android:
platform: 26

View file

@ -1,21 +0,0 @@
# SPDX-FileCopyrightText: 2018-2020, Collabora, Ltd. and the Monado contributors
# SPDX-License-Identifier: CC0-1.0
[binaries]
c = '/usr/bin/i686-linux-gnu-gcc'
cpp = '/usr/bin/i686-linux-gnu-g++'
ar = '/usr/bin/i686-linux-gnu-ar'
strip = '/usr/bin/i686-linux-gnu-strip'
objcopy = '/usr/bin/i686-linux-gnu-objcopy'
ld= '/usr/bin/i686-linux-gnu-ld'
pkgconfig = '/usr/bin/i686-linux-gnu-pkg-config'
sdl2-config = '/bin/false'
[properties]
needs_exe_wrapper = False
[host_machine]
system = 'linux'
cpu_family = 'x86'
cpu = 'i386'
endian = 'little'

View file

@ -57,16 +57,3 @@ done
apt-get autoremove -y --purge
apt-get clean
# Generate cross build files for Meson
for arch in $CROSS_ARCHITECTURES; do
cross_file="/cross_file-$arch.txt"
/usr/share/meson/debcrossgen --arch "$arch" -o "$cross_file"
if [ "$arch" = "i386" ]; then
# Work around a bug in debcrossgen that should be fixed in the next release
sed -i "s|cpu_family = 'i686'|cpu_family = 'x86'|g" "$cross_file"
fi
# Rely on qemu-user being configured in binfmt_misc on the host
sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$cross_file"
done

View file

@ -1,30 +0,0 @@
# Copyright 2018-2019, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
doxyconf = configuration_data()
doxyconf.set('SRCDIR', meson.source_root())
doxyconf.set('BUILDDIR', meson.build_root())
doxyconf.set('CURBUILDDIR', meson.current_build_dir())
if get_option('doxygen-warn-undocumented') and get_option('doxygen-extract-all')
error('doxygen-warn-undocumented and doxygen-extract-all are mutually incompatible')
endif
if get_option('doxygen-warn-undocumented')
doxyconf.set('DOXYGEN_WARN_UNDOCUMENTED', 'YES')
else
doxyconf.set('DOXYGEN_WARN_UNDOCUMENTED', 'NO')
endif
if get_option('doxygen-extract-all')
doxyconf.set('DOXYGEN_EXTRACT_ALL', 'YES')
else
doxyconf.set('DOXYGEN_EXTRACT_ALL', 'NO')
endif
doxyfile = configure_file(input: 'Doxyfile.in',
output: 'Doxyfile', configuration: doxyconf)
html = custom_target('docs',
input: doxyfile, output: 'html', command: [doxygen, doxyfile],
build_by_default: true)

View file

@ -1,406 +0,0 @@
# Copyright 2019-2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
project(
'xrt',
['c', 'cpp'],
version: '21.0.0',
license: 'BSL-1.0',
meson_version: '>=0.49.0',
default_options: [
'c_std=c11',
'cpp_std=c++17',
'warning_level=3',
],
)
cc = meson.get_compiler('c')
cpp = meson.get_compiler('cpp')
add_project_arguments(cc.get_supported_arguments([
'-D_XOPEN_SOURCE=700',
'-Wno-unused-parameter',
'-Werror-implicit-function-declaration',
'-Werror=incompatible-pointer-types'
]), language: 'c')
add_project_arguments(cpp.get_supported_arguments([
'-D_XOPEN_SOURCE=700',
'-Wno-unused-parameter',
'-Wno-deprecated-copy', # Eigen
'-Wno-c11-extensions' # clang OpenCV
]), language: 'cpp')
#
# Pre-setting these variables
#
build_tracking = false
build_tracing = false
v4l2_required = false
hidapi_required = false
openhmd_required = false
#
# Adding dependencies
#
# When docs are disabled, doxygen will always appear as "not found"
doxygen = find_program('doxygen', required: get_option('docs'))
build_docs = doxygen.found()
glslangValidator = find_program('glslangValidator')
pthreads = cc.find_library('pthread', required: true)
rt = cc.find_library('rt', required: true)
avcodec = dependency('libavcodec', required: false)
egl = dependency('egl', required: get_option('egl'))
egl = egl.partial_dependency(includes: true)
if meson.version().version_compare('>=0.52')
eigen3 = dependency('eigen3', include_type: 'system')
else
eigen3 = dependency('eigen3')
endif
libjpeg = dependency('libjpeg', required: false)
libusb = dependency('libusb-1.0', required: false)
opengl = dependency('gl', required: get_option('opengl'))
opengles = dependency('glesv2', required: get_option('opengles'))
realsense = dependency('realsense2', required: false)
sdl2 = dependency('sdl2', required: get_option('gui'))
udev = dependency('libudev', required: false)
libuvc = dependency('libuvc', required: false)
vulkan = dependency('vulkan', required: true)
zlib = dependency('zlib', required: false)
survive = dependency('survive', required: false)
dbus = dependency('dbus-1', required: get_option('dbus'))
systemd = dependency('systemd', required: get_option('systemd'))
systemd_dep = dependency('libsystemd', required: get_option('systemd'))
libbsd = dependency('libbsd', required: get_option('libbsd'))
gst = dependency('gstreamer-1.0', required: false)
gst_app = dependency('gstreamer-app-1.0', required: false)
gst_video = dependency('gstreamer-video-1.0', required: false)
depthai = dependency('depthai', method: 'cmake', modules : ['depthai::core', 'depthai::opencv', 'XLink'], required: false)
onnxruntime = dependency('libonnxruntime', required: false)
percetto = dependency('percetto', required: false)
gst_found = gst.found() and gst_app.found() and gst_video.found()
leap = cc.find_library('Leap', dirs : ['/usr/local/lib'], required: false)
inc_leap = []
if leap.found()
inc_leap += include_directories('/usr/local/include')
endif
opencv = dependency('opencv', required: false)
if not opencv.found()
opencv = dependency('opencv4', required: false)
endif
if get_option('tracking').enabled() and not opencv.found()
error('tracking enabled but opencv not found')
endif
if get_option('tracking').auto()
build_tracking = opencv.found()
endif
# Find an external SLAM implementation
external_slam_systems = ['kimera_vio', 'basalt']
foreach slam_system : external_slam_systems
slam = dependency(slam_system, required: false)
if slam.found()
break
endif
endforeach
if get_option('tracing')
build_tracing = percetto.found()
endif
# TODO: make these behave well when not present
x11 = dependency('x11', required: get_option('xlib'))
x11_xcb = dependency('x11-xcb', required: get_option('xlib'))
xcb = dependency('xcb', required: get_option('xcb'))
xcb_randr = dependency('xcb-randr', required: get_option('xcb'))
wayland = dependency('wayland-client', required: get_option('wayland'))
wayland_protos = dependency('wayland-protocols', required: get_option('wayland'))
wayland_scanner = dependency('wayland-scanner', required: get_option('wayland'))
drm = dependency('libdrm', required: get_option('wayland'))
if wayland_scanner.found()
wayland_scanner = find_program(
wayland_scanner.get_pkgconfig_variable('wayland_scanner'),
native: true,
)
endif
build_opengl = false
if get_option('opengl').enabled() or get_option('opengl').auto()
build_opengl = opengl.found()
endif
build_opengles = false
if get_option('opengles').enabled() or get_option('opengles').auto()
build_opengles = opengles.found() and egl.found()
endif
build_egl = false
if get_option('egl').enabled() or get_option('egl').auto()
build_egl = opengl.found() and egl.found()
endif
build_xlib = false
if get_option('xlib').enabled() or get_option('xlib').auto()
build_xlib = x11.found()
endif
build_xcb = false
if get_option('xcb').enabled() or get_option('xcb').auto()
build_xcb = xcb.found()
endif
build_xcb_xrandr_direct = build_xcb and build_xlib and xcb_randr.found() and x11_xcb.found()
# requires only vulkan
build_vk_khr_display = true
build_wayland = false
build_wayland_direct = false
if get_option('wayland').enabled() or get_option('wayland').auto()
build_wayland = wayland.found() and wayland_protos.found() and wayland_scanner.found()
build_wayland_direct = build_wayland and drm.found() and wayland_protos.version().version_compare('>=1.22')
endif
# For now required on Linux
if target_machine.system() == 'linux'
v4l2_required = true
endif
drivers = get_option('drivers')
if 'ohmd' in drivers
openhmd_required = true
endif
if 'psvr' in drivers
hidapi_required = true
endif
if 'v4l2' in drivers
v4l2_required = true
endif
if 'auto' in drivers
drivers += ['dummy', 'hdk', 'hydra', 'ns', 'psmv', 'remote', 'wmr']
endif
openhmd = dependency('openhmd', required: openhmd_required)
hidapi = dependency('hidapi-libusb', required: hidapi_required)
has_v4l2_header = cc.has_header('linux/v4l2-common.h')
if openhmd.found() and ('auto' in drivers or 'ohmd' in drivers)
if 'ohmd' not in drivers
drivers += ['ohmd']
endif
endif
if opencv.found() and onnxruntime.found() and has_v4l2_header and ('auto' in drivers or 'handtracking' in drivers)
if 'handtracking' not in drivers
drivers += ['handtracking']
endif
endif
if hidapi.found() and ('auto' in drivers or 'psvr' in drivers or 'hdk' in drivers)
if 'psvr' not in drivers
drivers += ['psvr']
endif
endif
if zlib.found() and ('auto' in drivers or 'vive' in drivers)
if 'vive' not in drivers
drivers += ['vive']
endif
endif
if realsense.found() and ('auto' in drivers or 'realsense' in drivers)
if 'realsense' not in drivers
drivers += ['realsense']
endif
endif
if has_v4l2_header and ('auto' in drivers or 'v4l2' in drivers)
if 'v4l2' not in drivers
drivers += ['v4l2']
endif
endif
if gst_found and ('auto' in drivers or 'vf' in drivers)
if 'vf' not in drivers
drivers += ['vf']
endif
endif
if depthai.found() and ('auto' in drivers or 'depthai' in drivers)
if 'depthai' not in drivers
drivers += ['depthai']
endif
endif
if leap.found() and ('auto' in drivers or 'ulv2' in drivers)
if 'ulv2' not in drivers
drivers += ['ulv2']
endif
endif
if survive.found() and ('auto' in drivers and 'survive' not in drivers)
drivers += ['survive']
endif
if not get_option('dbus').disabled() and dbus.found()
if 'auto' in drivers and 'daydream' not in drivers
drivers += ['daydream']
endif
if 'auto' in drivers and 'arduino' not in drivers
drivers += ['arduino']
endif
endif
if sdl2.found() and ('auto' in drivers and 'qwerty' not in drivers)
drivers += ['qwerty']
endif
if opencv.found() and ('auto' in drivers and 'euroc' not in drivers)
drivers += ['euroc']
endif
if drivers.length() == 0 or drivers == ['auto']
error('You must enable at least one driver.')
endif
#
# Go down sub directories
#
subdir('src')
if build_docs
subdir('doc')
endif
if not get_option('tests').disabled()
subdir('tests')
endif
#
# Final bits
#
# This is here so that it gets emitted in the top-level build directory
manifest_devconf = configuration_data()
# https://github.com/mesonbuild/meson/issues/5940
manifest_devconf.set('runtime_path', openxr.full_path())
manifest_dev_json = configure_file(
input: manifest_in,
output: 'openxr_monado-dev.json',
configuration: manifest_devconf,
)
message('Configuration done!')
message(' drivers: ' + ', '.join(drivers))
if build_docs
message(' docs: yes')
else
message(' docs: no')
endif
if build_tracking
message(' tracking: yes')
else
message(' tracking: no')
endif
if build_tracing
message(' tracing: yes')
else
message(' tracing: no')
endif
if get_option('steamvr_plugin')
message('steamvr plugin: yes')
else
message('steamvr plugin: no')
endif
if build_opengl
message(' opengl: yes')
else
message(' opengl: no')
endif
if build_opengles
message(' opengles: yes')
else
message(' opengles: no')
endif
if build_egl
message(' egl: yes')
else
message(' egl: no')
endif
if build_xlib
message(' xlib: yes')
else
message(' xlib: no')
endif
if build_xcb
message(' xcb: yes')
else
message(' xcb: no')
endif
if build_wayland
message(' wayland: yes')
else
message(' wayland: no')
endif
if build_wayland_direct
message('wayland_direct: yes')
else
message('wayland_direct: no')
endif
if not get_option('systemd').disabled() and systemd.found()
message(' systemd: yes')
else
message(' systemd: no')
endif
if not get_option('dbus').disabled() and dbus.found()
message(' dbus: yes')
else
message(' dbus: no')
endif
if not get_option('libbsd').disabled() and libbsd.found()
message(' libbsd: yes')
else
message(' libbsd: no')
endif
if gst_found
message(' GStreamer: yes')
else
message(' GStreamer: no')
endif

View file

@ -1,177 +0,0 @@
# Copyright 2019-2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
option('drivers',
type: 'array',
choices: [
'auto',
'dummy',
'hdk',
'hydra',
'ns',
'ohmd',
'psmv',
'psvr',
'realsense',
'v4l2',
'vf',
'depthai',
'vive',
'wmr',
'survive',
'daydream',
'arduino',
'remote',
'handtracking',
'qwerty',
'ulv2',
'euroc',
'sample',
],
value: ['auto'],
description: 'Set of drivers to build')
option('docs',
type: 'feature',
value: 'auto',
description: 'Build the documentation')
option('tests',
type: 'feature',
value: 'auto',
description: 'Build the tests')
option('doxygen-warn-undocumented',
type: 'boolean',
value: false,
description: 'Configure doxygen to emit warnings for undocumented entities')
option('doxygen-extract-all',
type: 'boolean',
value: false,
description: 'Extract all entities for documentation, not just documented ones')
option('gui',
type: 'feature',
value: 'auto',
description: 'Enable GUI')
option('tracking',
type: 'feature',
value: 'auto',
description: 'Enable camera tracking support (disabling this will disable OpenCV support)')
option('install-active-runtime',
type: 'boolean',
value: true,
description: 'Make Monado the default OpenXR runtime on install')
option('opengl',
type: 'feature',
value: 'auto',
description: 'Enable OpenGL application support.')
option('opengles',
type: 'feature',
value: 'auto',
description: 'Enable OpenGL|ES application support.')
option('egl',
type: 'feature',
value: 'auto',
description: 'Enable EGL application support.')
option('xlib',
type: 'feature',
value: 'auto',
description: 'Enable xlib application support. Also required for direct mode on X.')
option('xcb',
type: 'feature',
value: 'auto',
description: 'Enable xcb support for direct mode on X.')
option('wayland',
type: 'feature',
value: 'auto',
description: 'Enable support for Wayland rendering.')
option('dbus',
type: 'feature',
value: 'auto',
description: 'Enable support for dbus.')
option('libbsd',
type: 'feature',
value: 'auto',
description: 'Enable support for libbsd.')
option('systemd',
type: 'feature',
value: 'auto',
description: 'Enable systemd support (for socket activation of service)')
option('service',
type: 'boolean',
value: true,
description: 'Enable separate service module for OpenXR runtime'
)
option('tracing',
type: 'boolean',
value: false,
description: 'Enable Perfetto/Percetto tracing'
)
option('layer_depth',
type: 'boolean',
value: true,
description: 'Enable support for Depth Layers'
)
option('layer_cube',
type: 'boolean',
value: false,
description: 'Enable support for Cube Layers'
)
option('layer_cylinder',
type: 'boolean',
value: true,
description: 'Enable support for Cylinder Layers'
)
option('layer_equirect1',
type: 'boolean',
value: true,
description: 'Enable support for legacy Equirect Layers'
)
option('layer_equirect2',
type: 'boolean',
value: true,
description: 'Enable support for Equirect2 Layers'
)
option('steamvr_plugin',
type: 'boolean',
value: true,
description: 'Enable SteamVR Plugin'
)
option('color_log',
type: 'boolean',
value: true,
description: 'Log in color'
)
option('systemd-user-unit-dir',
type: 'string',
description: 'Directory for user systemd units (defaults to /usr/lib/systemd/user)'
)
option('renderdoc',
type: 'boolean',
value: false,
description: 'Enable support for the RenderDoc API'
)

View file

@ -1,21 +0,0 @@
# Copyright 2019-2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
openvr_include = include_directories('openvr_includes', is_system: true)
cjson_include = include_directories('cjson')
flexkalman_include = include_directories('flexkalman')
glad_include = include_directories('glad/include')
hungarian_include = include_directories('hungarian')
imgui_include = include_directories('imgui')
openxr_include = include_directories('openxr_includes')
catch2_include = include_directories('Catch2')
stb_include = include_directories('stb')
slam_tracker_include = include_directories('slam_tracker')
renderdoc_include = include_directories('renderdoc_api')
if slam.found()
external_slam = declare_dependency(
include_directories: [slam_tracker_include],
dependencies: [slam],
)
endif

View file

@ -1,5 +0,0 @@
# Copyright 2019-2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
subdir('external')
subdir('xrt')

View file

@ -1,40 +0,0 @@
# Copyright 2019-2021, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
###
# Binding generation
#
aux_bindings_dir = meson.current_source_dir()
prog_python = import('python').find_installation('python3')
generated_bindings = custom_target('bindings code',
command: [prog_python, '@INPUT@', '@OUTPUT@'],
input: ['bindings.py', 'bindings.json'],
output: [
'b_generated_bindings.h',
'b_generated_bindings.c',
]
)
generated_bindings_h = generated_bindings[0]
generated_bindings_c = generated_bindings[1]
lib_aux_generated_bindings = static_library(
'aux_generated_bindings',
generated_bindings_c,
include_directories: [
xrt_include,
aux_include,
],
dependencies: [
xrt_config_have,
]
)
aux_generated_bindings = declare_dependency(
include_directories: aux_include,
sources: [generated_bindings_h],
link_with: lib_aux_generated_bindings,
)

View file

@ -1,364 +0,0 @@
# Copyright 2019-2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
aux_include = include_directories('.')
subdir('bindings')
u_git_tag_c = vcs_tag(
input: 'util/u_git_tag.c.in',
output: 'u_git_tag.c',
replace_string: '@GIT_DESC@',
)
aux_util_deps = [ xrt_config_have, aux_generated_bindings ]
if libbsd.found() and not get_option('libbsd').disabled()
aux_util_deps += libbsd
endif
if build_tracing
aux_util_deps += percetto
endif
lib_aux_util = static_library(
'aux_util',
files(
'util/u_bitwise.c',
'util/u_bitwise.h',
'util/u_debug.c',
'util/u_debug.h',
'util/u_device.c',
'util/u_device.h',
'util/u_distortion.c',
'util/u_distortion.h',
'util/u_distortion_mesh.c',
'util/u_distortion_mesh.h',
'util/u_documentation.h',
'util/u_file.c',
'util/u_file.h',
'util/u_format.c',
'util/u_format.h',
'util/u_frame.c',
'util/u_frame.h',
'util/u_generic_callbacks.hpp',
'util/u_git_tag.h',
'util/u_hand_tracking.c',
'util/u_hand_tracking.h',
'util/u_handles.c',
'util/u_handles.h',
'util/u_hashmap.cpp',
'util/u_hashmap.h',
'util/u_hashset.cpp',
'util/u_hashset.h',
'util/u_id_ringbuffer.cpp',
'util/u_id_ringbuffer.h',
'util/u_json.c',
'util/u_json.h',
'util/u_json.hpp',
'util/u_logging.c',
'util/u_logging.h',
'util/u_misc.c',
'util/u_misc.h',
'util/u_pacing.h',
'util/u_pacing_app.c',
'util/u_pacing_compositor.c',
'util/u_pacing_compositor_fake.c',
'util/u_pretty_print.c',
'util/u_pretty_print.h',
'util/u_sink.h',
'util/u_sink_force_genlock.c',
'util/u_sink_combiner.c',
'util/u_sink_converter.c',
'util/u_sink_deinterleaver.c',
'util/u_sink_queue.c',
'util/u_sink_simple_queue.c',
'util/u_sink_quirk.c',
'util/u_sink_split.c',
'util/u_sink_stereo_sbs_to_slam_sbs.c',
'util/u_string_list.cpp',
'util/u_string_list.h',
'util/u_string_list.hpp',
'util/u_template_historybuf.hpp',
'util/u_time.cpp',
'util/u_time.h',
'util/u_trace_marker.c',
'util/u_trace_marker.h',
'util/u_var.cpp',
'util/u_var.h',
'util/u_config_json.c',
'util/u_config_json.h',
'util/u_verify.h',
'util/u_process.c',
'util/u_process.h',
'util/u_worker.c',
'util/u_worker.cpp',
'util/u_worker.h',
'util/u_worker.hpp',
) + [
u_git_tag_c,
],
include_directories: [
xrt_include,
cjson_include,
],
dependencies: [
aux_util_deps,
xrt_config_have,
]
)
aux_util = declare_dependency(
include_directories: aux_include,
link_with: lib_aux_util,
)
if build_opengl or build_opengles
ogl_files = [
'ogl/ogl_documentation.h',
'ogl/ogl_api.h',
'ogl/ogl_api.c',
'ogl/ogl_helpers.c',
'ogl/ogl_helpers.h',
]
if build_opengl and build_xlib
ogl_files += [
'ogl/glx_api.h',
'ogl/glx_api.c',
]
endif
if build_opengles or build_egl
ogl_files += [
'ogl/egl_api.h',
'ogl/egl_api.c',
]
endif
lib_aux_ogl = static_library(
'aux_ogl',
files(ogl_files),
include_directories: [
xrt_include,
glad_include,
],
)
aux_ogl = declare_dependency(
include_directories: aux_include,
link_with: lib_aux_ogl,
)
endif
aux_os_files = files(
'os/os_documentation.h',
'os/os_hid.h',
'os/os_hid_hidraw.c',
'os/os_threading.h',
'os/os_time.h',
'os/os_ble.h',
)
aux_os_deps = []
if dbus.found() and not get_option('dbus').disabled()
aux_os_files += files(
'os/os_ble_dbus.c'
)
aux_os_deps += dbus
endif
lib_aux_os = static_library(
'aux_os',
aux_os_files,
dependencies: aux_os_deps,
include_directories: xrt_include,
)
aux_os = declare_dependency(
include_directories: aux_include,
link_with: lib_aux_os,
)
lib_aux_math = static_library(
'aux_math',
files(
'math/m_api.h',
'math/m_base.cpp',
'math/m_eigen_interop.hpp',
'math/m_filter_fifo.c',
'math/m_filter_fifo.h',
'math/m_filter_one_euro.c',
'math/m_filter_one_euro.h',
'math/m_hash.cpp',
'math/m_imu_3dof.c',
'math/m_imu_3dof.h',
'math/m_imu_pre.c',
'math/m_imu_pre.h',
'math/m_lowpass_float.cpp',
'math/m_lowpass_float.h',
'math/m_lowpass_float.hpp',
'math/m_lowpass_float_vector.hpp',
'math/m_lowpass_integer.cpp',
'math/m_lowpass_integer.h',
'math/m_lowpass_integer.hpp',
'math/m_optics.c',
'math/m_permutation.c',
'math/m_permutation.h',
'math/m_predict.c',
'math/m_predict.h',
'math/m_quatexpmap.cpp',
'math/m_relation_history.cpp',
'math/m_relation_history.h',
'math/m_space.cpp',
'math/m_space.h',
'math/m_vec2.h',
'math/m_vec3.h',
),
include_directories: xrt_include,
dependencies: [eigen3],
)
aux_math = declare_dependency(
include_directories: aux_include,
link_with: lib_aux_math,
)
tracking_srcs = [
'tracking/t_data_utils.c',
'tracking/t_imu.h',
'tracking/t_imu_fusion.hpp',
'tracking/t_imu.cpp',
'tracking/t_tracking.h',
]
tracking_deps = [eigen3]
if build_tracking
tracking_srcs += [
'tracking/t_calibration.cpp',
'tracking/t_calibration_opencv.hpp',
'tracking/t_convert.cpp',
'tracking/t_debug_hsv_filter.cpp',
'tracking/t_debug_hsv_picker.cpp',
'tracking/t_debug_hsv_viewer.cpp',
'tracking/t_euroc_recorder.cpp',
'tracking/t_euroc_recorder.h',
'tracking/t_file.cpp',
'tracking/t_frame_cv_mat_wrapper.cpp',
'tracking/t_frame_cv_mat_wrapper.hpp',
'tracking/t_fusion.hpp',
'tracking/t_helper_debug_sink.hpp',
'tracking/t_hsv_filter.c',
'tracking/t_kalman.cpp',
'tracking/t_tracker_psmv.cpp',
'tracking/t_tracker_psmv_fusion.hpp',
'tracking/t_tracker_psvr.cpp',
'tracking/t_tracker_hand.cpp',
]
tracking_deps += [opencv]
if slam.found()
tracking_srcs += ['tracking/t_tracker_slam.cpp']
tracking_deps += [external_slam]
endif
endif
lib_aux_tracking = static_library(
'aux_tracking',
files(tracking_srcs),
include_directories: [
xrt_include,
flexkalman_include,
hungarian_include,
cjson_include,
],
dependencies: tracking_deps
)
aux_tracking = declare_dependency(
include_directories: aux_include,
link_with: lib_aux_tracking,
)
lib_aux_vive = static_library(
'aux_vive',
files(
'vive/vive_config.c',
'vive/vive_config.h',
),
include_directories: [
xrt_include,
cjson_include,
],
dependencies: [zlib, aux_tracking],
)
aux_vive = declare_dependency(
include_directories: aux_include,
link_with: lib_aux_vive,
)
lib_aux_vk = static_library(
'aux_vk',
files(
'vk/vk_bundle_init.c',
'vk/vk_command_buffer.c',
'vk/vk_compositor_flags.c',
'vk/vk_documentation.h',
'vk/vk_function_loaders.c',
'vk/vk_helpers.h',
'vk/vk_helpers.c',
'vk/vk_image_allocator.h',
'vk/vk_image_allocator.c',
'vk/vk_image_readback_to_xf_pool.h',
'vk/vk_image_readback_to_xf_pool.c',
'vk/vk_print.c',
'vk/vk_state_creators.c',
'vk/vk_sync_objects.c',
'vk/vk_time.c',
),
include_directories: [
xrt_include,
],
)
aux_vk = declare_dependency(
include_directories: aux_include,
link_with: lib_aux_vk,
)
all_aux = [aux_util, aux_os, aux_math, aux_tracking, aux_generated_bindings, aux_vive]
# GStreamer library.
if gst_found
lib_aux_gstreamer = static_library(
'aux_gstreamer',
files(
'gstreamer/gst_internal.h',
'gstreamer/gst_sink.h',
'gstreamer/gst_sink.c',
'gstreamer/gst_pipeline.h',
'gstreamer/gst_pipeline.c',
),
include_directories: [
xrt_include,
],
dependencies: [
aux_math,
aux_os,
gst,
gst_app,
gst_video,
],
)
aux_gstreamer = declare_dependency(
include_directories: aux_include,
link_with: lib_aux_gstreamer,
)
all_aux += aux_gstreamer
endif
aux = declare_dependency(dependencies: all_aux)

View file

@ -1,174 +0,0 @@
# Copyright 2019-2021, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
subdir('shaders')
comp_include = include_directories('.')
# TODO: Dependency resolution and subsequent configuration could be improved
compositor_deps = [aux, shaders, vulkan, xrt_config_vulkan, xcb_randr]
compositor_includes = [xrt_include]
compositor_srcs = [
'client/comp_vk_client.c',
'client/comp_vk_client.h',
'client/comp_vk_glue.c',
'main/comp_compositor.c',
'main/comp_compositor.h',
'main/comp_documentation.h',
'main/comp_renderer.c',
'main/comp_renderer.h',
'main/comp_settings.c',
'main/comp_settings.h',
'main/comp_target.h',
'main/comp_target_swapchain.c',
'main/comp_target_swapchain.h',
'main/comp_window.h',
'main/comp_layer_renderer.c',
'main/comp_layer.c',
'multi/comp_multi_compositor.c',
'multi/comp_multi_interface.h',
'multi/comp_multi_private.h',
'multi/comp_multi_system.c',
'render/render_buffer.c',
'render/render_compute.c',
'render/render_gfx.c',
'render/render_interfaces.h',
'render/render_resources.c',
'render/render_shaders.c',
'render/render_util.c',
'util/comp_base.h',
'util/comp_base.c',
'util/comp_semaphore.h',
'util/comp_semaphore.c',
'util/comp_swapchain.h',
'util/comp_swapchain.c',
'util/comp_sync.h',
'util/comp_sync.c',
'util/comp_vulkan.h',
'util/comp_vulkan.c',
]
compile_args = []
if build_xcb
compositor_srcs += ['main/comp_window_xcb.c']
compositor_deps += [xcb]
endif
if build_vk_khr_display
compositor_srcs += ['main/comp_window_vk_display.c']
endif
if build_xcb_xrandr_direct
compositor_srcs += ['main/comp_window_direct_randr.c',
'main/comp_window_direct_nvidia.c']
compositor_deps += [xcb_randr, x11_xcb]
endif
if build_vk_khr_display or build_xcb_xrandr_direct
compositor_srcs += ['main/comp_window_direct.c']
endif
if build_opengl or build_opengles
compositor_srcs += [
'client/comp_gl_client.c',
'client/comp_gl_client.h',
'client/comp_gl_memobj_swapchain.c',
'client/comp_gl_memobj_swapchain.h',
]
endif
if build_opengl
compositor_srcs += [
'client/comp_gl_glue.c',
]
compositor_deps += [opengl]
compositor_includes += [glad_include]
endif
if build_opengles
compositor_srcs += [
'client/comp_gles_glue.c',
]
compositor_deps += [opengles]
compositor_includes += [glad_include]
endif
if build_egl
compositor_srcs += [
'client/comp_gl_eglimage_swapchain.c',
'client/comp_gl_eglimage_swapchain.h',
]
endif
if build_opengl and build_xlib
compositor_srcs += [
'client/comp_gl_xlib_client.c',
'client/comp_gl_xlib_client.h',
'client/comp_gl_xlib_glue.c',
]
compositor_deps += [x11]
endif
if build_egl
compositor_srcs += [
'client/comp_egl_client.c',
'client/comp_egl_client.h',
]
compositor_deps += [egl]
endif
if build_wayland
wl_protos_src = []
wl_protos_headers = []
wl_protocol_dir = wayland_protos.get_pkgconfig_variable('pkgdatadir')
protocols = [
wl_protocol_dir / 'stable/xdg-shell/xdg-shell.xml',
]
if build_wayland_direct
protocols += wl_protocol_dir / 'staging/drm-lease/drm-lease-v1.xml'
compositor_srcs += 'main/comp_window_direct_wayland.c'
compositor_deps += drm
endif
compositor_srcs += 'main/comp_window_wayland.c'
foreach path : protocols
wl_protos_src += custom_target(
path.underscorify() + '_c',
input: path,
output: '@BASENAME@-protocol.c',
command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
)
wl_protos_headers += custom_target(
path.underscorify() + '_client_h',
input: path,
output: '@BASENAME@-client-protocol.h',
command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
)
endforeach
lib_wl_protos = static_library(
'wl_protos',
wl_protos_src + wl_protos_headers,
dependencies: wayland.partial_dependency(compile_args: true),
)
wl_protos = declare_dependency(
link_with: lib_wl_protos,
sources: wl_protos_headers,
)
compositor_deps += [wayland, wl_protos]
endif
lib_comp = static_library(
'comp',
compositor_srcs,
include_directories: compositor_includes,
dependencies: compositor_deps,
c_args: compile_args,
cpp_args: compile_args,
)

View file

@ -1,36 +0,0 @@
# Copyright 2019-2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
shader_srcs = [
'clear.comp',
'distortion.comp',
'mesh.frag',
'mesh.vert',
'layer.vert',
'layer.frag',
'equirect1.vert',
'equirect1.frag',
'equirect2.vert',
'equirect2.frag'
]
shader_headers = []
foreach shader : shader_srcs
header_out = shader + '.h'
shader_headers += custom_target(
header_out,
command: [
glslangValidator,
'-V', '@INPUT@',
'-o', '@OUTPUT@',
'--vn', 'shaders_' + shader.underscorify(),
],
input: shader,
output: header_out,
)
endforeach
shaders = declare_dependency(
include_directories: include_directories('..'),
sources: shader_headers,
)

View file

@ -1,362 +0,0 @@
# Copyright 2019-2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
drv_include = include_directories('.')
lib_drv_depthai = static_library(
'drv_depthai',
files(
'depthai/depthai_driver.cpp',
),
include_directories: [xrt_include, cjson_include],
dependencies: [aux, opencv, depthai],
build_by_default: 'depthai' in drivers,
)
drv_depthai = declare_dependency(
include_directories: drv_include,
link_with: lib_drv_depthai
)
lib_drv_dummy = static_library(
'drv_dummy',
files(
'dummy/dummy_hmd.c',
'dummy/dummy_interface.h',
'dummy/dummy_prober.c',
),
include_directories: xrt_include,
dependencies: [aux],
build_by_default: 'dummy' in drivers,
)
lib_drv_hdk = static_library(
'drv_hdk',
files(
'hdk/hdk_device.cpp',
'hdk/hdk_device.h',
'hdk/hdk_interface.h',
'hdk/hdk_prober.c',
),
include_directories: xrt_include,
dependencies: [aux],
build_by_default: 'hdk' in drivers,
)
lib_drv_hydra = static_library(
'drv_hydra',
files(
'hydra/hydra_driver.c',
'hydra/hydra_interface.h',
),
include_directories: xrt_include,
dependencies: [aux],
build_by_default: 'hydra' in drivers,
)
lib_drv_ns = static_library(
'drv_ns',
files(
'north_star/distortion_3d/utility_northstar.h',
'north_star/distortion_3d/deformation_northstar.h',
'north_star/distortion_3d/deformation_northstar.cpp',
'north_star/ns_hmd.h',
'north_star/ns_hmd.c',
'north_star/ns_interface.h',
'north_star/ns_prober.c',
),
include_directories: [
xrt_include,
cjson_include,
],
dependencies: [aux, xrt_config_drivers],
build_by_default: 'ns' in drivers,
)
lib_drv_ulv2 = static_library(
'drv_ulv2',
files(
'ultraleap_v2/ulv2_driver.cpp',
'ultraleap_v2/ulv2_interface.h',
),
include_directories: [xrt_include, inc_leap],
dependencies: [aux, leap],
build_by_default: 'ulv2' in drivers,
)
if 'handtracking' in drivers
lib_drv_ht = static_library(
'drv_ht',
files(
'ht/ht_driver.c',
'ht/ht_interface.h',
),
include_directories: [xrt_include, cjson_include],
dependencies: [aux],
link_with: [lib_t_hand_async, lib_t_ht_old_rgb, t_ht_mercury],
# build_by_default: 'handtracking' in drivers,
)
endif
lib_drv_cemu = static_library(
'drv_cemu',
files(
'ht_ctrl_emu/ht_ctrl_emu.cpp',
'ht_ctrl_emu/ht_ctrl_emu_interface.h',
),
include_directories: [xrt_include, cjson_include],
dependencies: [aux],
build_by_default: 'handtracking' in drivers,
)
lib_drv_ohmd = static_library(
'drv_ohmd',
files(
'ohmd/oh_device.c',
'ohmd/oh_device.h',
'ohmd/oh_interface.h',
'ohmd/oh_prober.c',
),
include_directories: xrt_include,
dependencies: [aux, openhmd],
build_by_default: 'ohmd' in drivers,
)
lib_drv_psmv = static_library(
'drv_psmv',
files(
'psmv/psmv_driver.c',
'psmv/psmv_interface.h',
),
include_directories: xrt_include,
dependencies: [aux],
build_by_default: 'psmv' in drivers,
)
lib_drv_psvr = static_library(
'drv_psvr',
files(
'psvr/psvr_device.c',
'psvr/psvr_device.h',
'psvr/psvr_interface.h',
'psvr/psvr_packet.c',
'psvr/psvr_prober.c',
),
include_directories: xrt_include,
dependencies: [aux, hidapi],
build_by_default: 'psvr' in drivers,
)
lib_drv_realsense = static_library(
'drv_realsense',
files(
'realsense/rs_ddev.c',
'realsense/rs_hdev.c',
'realsense/rs_interface.h',
'realsense/rs_driver.h',
'realsense/rs_prober.c',
),
include_directories: [xrt_include,cjson_include],
dependencies: [aux, realsense],
build_by_default: 'rs' in drivers,
)
lib_drv_remote = static_library(
'drv_remote',
files(
'remote/r_device.c',
'remote/r_hmd.c',
'remote/r_hub.c',
'remote/r_interface.h',
'remote/r_internal.h',
),
include_directories: xrt_include,
dependencies: [aux],
build_by_default: 'remote' in drivers,
)
lib_drv_vf = static_library(
'drv_vf',
files(
'vf/vf_driver.c'
),
include_directories: xrt_include,
dependencies: [aux, gst, gst_app, gst_video],
build_by_default: 'vf' in drivers,
)
drv_vf = declare_dependency(
include_directories: drv_include,
link_with: lib_drv_vf,
)
lib_drv_v4l2 = static_library(
'drv_v4l2',
files(
'v4l2/v4l2_driver.c',
),
include_directories: xrt_include,
dependencies: [aux],
build_by_default: 'v4l2' in drivers,
)
lib_drv_vive = static_library(
'drv_vive',
files(
'vive/vive_device.c',
'vive/vive_device.h',
'vive/vive_protocol.c',
'vive/vive_protocol.h',
'vive/vive_prober.h',
'vive/vive_prober.c',
'vive/vive_controller.c',
'vive/vive_controller.h',
'vive/vive_lighthouse.c',
'vive/vive_lighthouse.h',
),
include_directories: [
xrt_include,
aux_include,
cjson_include,
],
dependencies: [aux, zlib, aux_vive],
build_by_default: 'vive' in drivers,
)
lib_drv_survive = static_library(
'drv_survive',
files(
'survive/survive_driver.c',
'survive/survive_driver.h',
'survive/survive_interface.h',
'survive/survive_prober.c',
),
include_directories: [
xrt_include,
aux_include,
cjson_include,
],
dependencies: [aux, zlib, survive, aux_vive],
build_by_default: 'survive' in drivers,
)
lib_drv_daydream = static_library(
'drv_daydream',
files(
'daydream/daydream_device.c',
'daydream/daydream_device.h',
'daydream/daydream_interface.h',
'daydream/daydream_prober.c',
),
include_directories: [
xrt_include,
],
dependencies: [dbus, aux],
build_by_default: 'daydream' in drivers,
)
lib_drv_arduino = static_library(
'drv_arduino',
files(
'arduino/arduino_device.c',
'arduino/arduino_interface.h',
'arduino/arduino_prober.c',
),
include_directories: [
xrt_include,
],
dependencies: [dbus, aux],
build_by_default: 'arduino' in drivers,
)
lib_drv_multi = static_library(
'drv_multi',
files(
'multi_wrapper/multi.c',
'multi_wrapper/multi.h'
),
include_directories: [
xrt_include,
],
dependencies: [aux],
build_by_default: true,
)
lib_drv_qwerty = static_library(
'drv_qwerty',
files(
'qwerty/qwerty_device.c',
'qwerty/qwerty_device.h',
'qwerty/qwerty_interface.h',
'qwerty/qwerty_prober.c',
'qwerty/qwerty_sdl.c',
),
include_directories: xrt_include,
dependencies: [aux, sdl2],
build_by_default: 'qwerty' in drivers,
)
drv_qwerty_include = include_directories('qwerty')
wmr_camera_files = []
wmr_deps = [aux]
if libusb.found()
wmr_camera_files += 'wmr/wmr_camera.c'
wmr_deps += [libusb]
endif
lib_drv_wmr = static_library(
'drv_wmr',
files(
'wmr/wmr_common.h',
'wmr/wmr_camera.h',
'wmr/wmr_config.c',
'wmr/wmr_bt_controller.c',
'wmr/wmr_bt_controller.h',
'wmr/wmr_hmd.c',
'wmr/wmr_hmd.h',
'wmr/wmr_interface.h',
'wmr/wmr_prober.c',
'wmr/wmr_protocol.c',
'wmr/wmr_protocol.h',
'wmr/wmr_controller_protocol.c',
'wmr/wmr_controller_protocol.h',
'wmr/wmr_source.c',
'wmr/wmr_source.h',
) + wmr_camera_files,
include_directories: [
xrt_include,
cjson_include,
],
dependencies: wmr_deps,
build_by_default: 'wmr' in drivers,
)
lib_drv_euroc = static_library(
'drv_euroc',
files(
'euroc/euroc_player.cpp',
'euroc/euroc_driver.h',
'euroc/euroc_device.c',
'euroc/euroc_interface.h',
'euroc/euroc_runner.c',
),
include_directories: [xrt_include],
dependencies: [aux, opencv],
build_by_default: 'euroc' in drivers,
)
# We build the sample driver to make sure it stays valid,
# but it never gets linked into a final target (src/xrt/targets/meson.build)
lib_drv_sample = static_library(
'drv_sample',
files(
'sample/sample_hmd.c',
'sample/sample_interface.h',
'sample/sample_prober.c',
),
include_directories: [xrt_include],
dependencies: [aux],
build_by_default: 'sample' in drivers,
)

View file

@ -1,6 +0,0 @@
# Copyright 2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
xrt_include = include_directories('.')
subdir('xrt')

View file

@ -1,217 +0,0 @@
# Copyright 2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
#####
# Drivers config
#
drivers_conf = configuration_data()
foreach driver : drivers
drivers_conf.set('XRT_BUILD_DRIVER_' + driver.to_upper(), true)
endforeach
xrt_config_drivers_h = configure_file(
output: 'xrt_config_drivers.h',
configuration: drivers_conf,
)
xrt_config_drivers = declare_dependency(
sources: xrt_config_drivers_h,
include_directories: xrt_include,
)
#####
# Have config
#
have_conf = configuration_data()
if build_egl
have_conf.set('XRT_HAVE_EGL', true)
endif
if avcodec.found()
have_conf.set('XRT_HAVE_FFMPEG', true)
endif
if libjpeg.found()
have_conf.set('XRT_HAVE_JPEG', true)
endif
if udev.found()
have_conf.set('XRT_HAVE_LIBUDEV', true)
endif
if libusb.found()
have_conf.set('XRT_HAVE_LIBUSB', true)
endif
if libuvc.found()
have_conf.set('XRT_HAVE_LIBUVC', true)
endif
if opencv.found() and build_tracking
have_conf.set('XRT_HAVE_OPENCV', true)
endif
if build_opengl
have_conf.set('XRT_HAVE_OPENGL', true)
endif
if build_opengles
have_conf.set('XRT_HAVE_OPENGLES', true)
endif
if sdl2.found()
have_conf.set('XRT_HAVE_SDL2', true)
endif
if hidapi.found() and 'psvr' in drivers
have_conf.set('XRT_HAVE_HIDAPI', true)
endif
if has_v4l2_header and 'v4l2' in drivers
have_conf.set('XRT_HAVE_V4L2', true)
endif
if true
have_conf.set('XRT_HAVE_VULKAN', true)
endif
if dbus.found() and not get_option('dbus').disabled()
have_conf.set('XRT_HAVE_DBUS', true)
endif
if systemd_dep.found() and not get_option('systemd').disabled()
have_conf.set('XRT_HAVE_SYSTEMD', true)
endif
if get_option('layer_depth')
have_conf.set('XRT_FEATURE_OPENXR_LAYER_DEPTH', true)
endif
if get_option('layer_cube')
have_conf.set('XRT_FEATURE_OPENXR_LAYER_CUBE', true)
endif
if get_option('layer_cylinder')
have_conf.set('XRT_FEATURE_OPENXR_LAYER_CYLINDER', true)
endif
if get_option('layer_equirect1')
have_conf.set('XRT_FEATURE_OPENXR_LAYER_EQUIRECT1', true)
endif
if get_option('layer_equirect2')
have_conf.set('XRT_FEATURE_OPENXR_LAYER_EQUIRECT2', true)
endif
if libbsd.found() and not get_option('libbsd').disabled()
have_conf.set('XRT_HAVE_LIBBSD', true)
endif
if slam.found() and build_tracking
have_conf.set('XRT_HAVE_SLAM', true)
have_conf.set('XRT_HAVE_KIMERA_SLAM', slam.name() == 'kimera_vio')
have_conf.set('XRT_HAVE_BASALT_SLAM', slam.name() == 'basalt')
endif
if build_wayland
have_conf.set('XRT_HAVE_WAYLAND', true)
endif
if build_wayland_direct
have_conf.set('XRT_HAVE_WAYLAND_DIRECT', true)
endif
if build_tracing
have_conf.set('XRT_HAVE_PERCETTO', true)
endif
if gst_found
have_conf.set('XRT_HAVE_GST', true)
endif
xrt_config_have_h = configure_file(
output: 'xrt_config_have.h',
configuration: have_conf,
)
xrt_config_have = declare_dependency(
sources: xrt_config_have_h,
include_directories: xrt_include,
)
#####
# Build config
#
build_conf = configuration_data()
if get_option('service')
build_conf.set('XRT_FEATURE_SERVICE', true)
endif
if get_option('tracing')
build_conf.set('XRT_FEATURE_TRACING', true)
endif
if get_option('color_log')
build_conf.set('XRT_FEATURE_COLOR_LOG', true)
endif
if get_option('renderdoc')
build_conf.set('XRT_FEATURE_RENDERDOC', true)
endif
xrt_config_build_h = configure_file(
output: 'xrt_config_build.h',
configuration: build_conf,
)
xrt_config_build = declare_dependency(
sources: xrt_config_build_h,
include_directories: xrt_include,
)
#####
# Vulkan config
#
vulkan_conf = configuration_data()
# Vulkan flags for the shared Vulkan code.
if build_wayland
vulkan_conf.set('VK_USE_PLATFORM_WAYLAND_KHR', true)
endif
if build_xcb
vulkan_conf.set('VK_USE_PLATFORM_XCB_KHR', true)
endif
if build_xcb_xrandr_direct
vulkan_conf.set('VK_USE_PLATFORM_XLIB_XRANDR_EXT', true)
endif
if build_vk_khr_display
vulkan_conf.set('VK_USE_PLATFORM_DISPLAY_KHR', true)
endif
xrt_config_vulkan_h = configure_file(
output: 'xrt_config_vulkan.h',
configuration: vulkan_conf,
)
xrt_config_vulkan = declare_dependency(
sources: xrt_config_vulkan_h,
include_directories: xrt_include,
)
#####
# Mock Android config
#
android_conf = configuration_data()
# No actual config data in here.
xrt_config_android_h = configure_file(
output: 'xrt_config_android.h',
configuration: android_conf,
)

View file

@ -1,75 +0,0 @@
# Copyright 2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
ipc_include = include_directories('.')
###
# Generated
prog_python = import('python').find_installation('python3')
common_sources = [
'shared/ipc_shmem.c',
'shared/ipc_shmem.h',
'shared/ipc_utils.c',
'shared/ipc_utils.h',
]
generated = custom_target('protocol code',
command: [prog_python, '@INPUT@', '@OUTPUT@'],
input: ['shared/proto.py', 'shared/proto.json'],
output: [
'ipc_protocol_generated.h',
'ipc_client_generated.c',
'ipc_client_generated.h',
'ipc_server_generated.c',
'ipc_server_generated.h',
]
)
ipc_generated_client_header_target = generated[2]
###
# Client
lib_ipc_client = static_library(
'ipc_client',
common_sources + [
generated[0],
generated[1],
generated[2],
'client/ipc_client.h',
'client/ipc_client_compositor.c',
'client/ipc_client_device.c',
'client/ipc_client_hmd.c',
'client/ipc_client_instance.c',
],
include_directories: [
xrt_include,
],
dependencies: [aux, rt]
)
###
# Server
lib_ipc_server = static_library(
'ipc_server',
common_sources + [
generated[0],
generated[3],
generated[4],
'server/ipc_server.h',
'server/ipc_server_handler.c',
'server/ipc_server_per_client_thread.c',
'server/ipc_server_process.c',
'server/ipc_server_mainloop_linux.c',
],
include_directories: [
xrt_include,
comp_include,
glad_include,
],
dependencies: [aux_util, rt, aux_vk, aux_ogl]
)

View file

@ -1,15 +0,0 @@
# Copyright 2019, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
xrt_include = include_directories('include')
subdir('include')
subdir('auxiliary')
subdir('tracking')
subdir('drivers')
subdir('compositor')
subdir('state_trackers')
if get_option('service')
subdir('ipc')
endif
subdir('targets')

View file

@ -1,71 +0,0 @@
# Copyright 2019-2021, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
gui_sources = [
'gui_common.h',
'gui_imgui.h',
'gui_ogl.c',
'gui_prober.c',
'gui_scene.cpp',
'gui_scene_calibrate.c',
'gui_scene_debug.c',
'gui_scene_main_menu.c',
'gui_scene_record.c',
'gui_scene_remote.c',
'gui_scene_video.c',
'gui_scene_tracking_overrides.c',
'gui_stb.c',
'gui_window_record.c',
'gui_window_record.h',
'../../../external/imgui/imgui/cimgui.cpp',
'../../../external/imgui/imgui/cimgui.h',
'../../../external/imgui/imgui/cimplot.cpp',
'../../../external/imgui/imgui/cimplot.h',
'../../../external/imgui/imgui/imconfig.h',
'../../../external/imgui/imgui/imgui.cpp',
'../../../external/imgui/imgui/imgui.h',
'../../../external/imgui/imgui/imgui_demo.cpp',
'../../../external/imgui/imgui/imgui_draw.cpp',
'../../../external/imgui/imgui/imgui_impl_opengl3.cpp',
'../../../external/imgui/imgui/imgui_impl_opengl3.h',
'../../../external/imgui/imgui/imgui_internal.h',
'../../../external/imgui/imgui/imgui_widgets.cpp',
'../../../external/imgui/imgui/implot.cpp',
'../../../external/imgui/imgui/implot.h',
'../../../external/imgui/imgui/implot_demo.cpp',
'../../../external/imgui/imgui/implot_internal.h',
'../../../external/imgui/imgui/implot_items.cpp',
'../../../external/imgui/imgui/imstb_rectpack.h',
'../../../external/imgui/imgui/imstb_textedit.h',
'../../../external/imgui/imgui/imstb_truetype.h',
'../../../external/imgui/imgui_monado/cimgui_monado.h',
'../../../external/imgui/imgui_monado/imgui_monado.cpp'
]
gui_deps = [aux, xrt_config_have]
if 'vf' in drivers
gui_deps += [drv_vf]
endif
if 'depthai' in drivers
gui_deps += [drv_depthai]
endif
if gst_found
gui_deps += [aux_gstreamer]
endif
lib_st_gui = static_library(
'st_gui',
files(gui_sources),
include_directories: [
xrt_include,
drv_include,
glad_include,
cjson_include,
imgui_include,
stb_include,
],
dependencies: gui_deps,
)

View file

@ -1,12 +0,0 @@
# Copyright 2019, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
st_include = include_directories('.')
subdir('gui')
subdir('oxr')
subdir('prober')
if get_option('steamvr_plugin')
subdir('steamvr_drv')
endif

View file

@ -1,75 +0,0 @@
# Copyright 2019-2022, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
###
# Main code
#
compile_args = []
if build_opengl
compile_args += ['-DXR_USE_GRAPHICS_API_OPENGL']
endif
if build_opengles
compile_args += ['-DXR_USE_GRAPHICS_API_OPENGL_ES']
endif
if build_egl
compile_args += ['-DXR_USE_PLATFORM_EGL']
endif
if build_xlib
compile_args += ['-DXR_USE_PLATFORM_XLIB']
endif
lib_st_oxr = static_library(
'st_oxr',
[
'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',
'oxr_event.c',
'oxr_extension_support.h',
'oxr_handle_base.c',
'oxr_input.c',
'oxr_input_transform.c',
'oxr_input_transform.h',
'oxr_instance.c',
'oxr_logger.c',
'oxr_logger.h',
'oxr_objects.h',
'oxr_path.c',
'oxr_pretty_print.c',
'oxr_pretty_print.h',
'oxr_session.c',
'oxr_session_frame_end.c',
'oxr_session_gfx_gl.c',
'oxr_session_gfx_egl.c',
'oxr_session_gfx_vk.c',
'oxr_space.c',
'oxr_swapchain.c',
'oxr_swapchain_gl.c',
'oxr_swapchain_vk.c',
'oxr_system.c',
'oxr_two_call.h',
'oxr_verify.c',
'oxr_vulkan.c',
'oxr_xdev.c',
],
include_directories: [
xrt_include,
openxr_include,
renderdoc_include,
],
dependencies: [aux, vulkan],
c_args: compile_args,
cpp_args: compile_args,
)

View file

@ -1,38 +0,0 @@
# Copyright 2019-2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
prober_sources = [
'p_documentation.h',
'p_dump.c',
'p_prober.c',
'p_prober.h',
'p_tracking.c',
]
prober_deps = [aux, xrt_config_drivers, xrt_config_have]
if udev.found()
prober_sources += ['p_udev.c']
prober_deps += [udev]
endif
if libusb.found()
prober_sources += ['p_libusb.c']
prober_deps += [libusb]
endif
if libuvc.found()
prober_sources += ['p_libuvc.c']
prober_deps += [libuvc]
endif
lib_st_prober = static_library(
'st_prober',
files(prober_sources),
include_directories: [
xrt_include,
drv_include,
cjson_include,
],
dependencies: prober_deps,
)

View file

@ -1,20 +0,0 @@
# Copyright 2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
st_ovrd_include = include_directories('.')
lib_st_ovrd = static_library(
'st_ovrd',
files(
'ovrd_driver.cpp',
'ovrd_interface.h'
),
include_directories: [
openvr_include,
st_include, # Sigh debian meson requires this.
xrt_include,
],
dependencies: [aux_util, aux_generated_bindings],
c_args: compile_args,
cpp_args: compile_args,
)

View file

@ -1,36 +0,0 @@
# Copyright 2019-2021, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
cli = executable(
'monado-cli',
files(
'cli_cmd_calibrate.c',
'cli_cmd_lighthouse.c',
'cli_cmd_probe.c',
'cli_cmd_slambatch.c',
'cli_cmd_test.c',
'cli_common.h',
'cli_main.c',
),
link_whole: [
lib_aux_os,
lib_aux_util,
lib_aux_math,
lib_st_prober,
lib_target_instance_no_comp,
] + driver_libs,
include_directories: [
aux_include,
common_include,
drv_include,
xrt_include,
cjson_include,
],
dependencies: [
libusb,
libuvc,
pthreads,
udev,
] + driver_deps,
install: true,
)

View file

@ -1,33 +0,0 @@
# Copyright 2019-2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
common_include = include_directories('.')
lib_target_lists = static_library(
'target_lists',
files(
'target_lists.c',
),
include_directories: [drv_include, xrt_include],
dependencies: [aux, xrt_config_drivers],
)
lib_target_instance = static_library(
'target_instance',
files(
'target_instance.c',
),
include_directories: [xrt_include],
link_with: [lib_target_lists, lib_st_prober],
dependencies: [aux],
)
lib_target_instance_no_comp = static_library(
'target_instance_no_comp',
files(
'target_instance_no_comp.c',
),
include_directories: [xrt_include],
link_with: [lib_target_lists, lib_st_prober],
dependencies: [aux],
)

View file

@ -1,20 +0,0 @@
# Copyright 2019, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
ctl = executable(
'monado-ctl',
files(
'main.c',
) + [ ipc_generated_client_header_target ],
link_whole: [
lib_ipc_client,
],
include_directories: [
xrt_include,
aux_include,
ipc_include,
],
dependencies: [
],
install: true,
)

View file

@ -1,46 +0,0 @@
# Copyright 2019-2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
gui_deps = [
libusb,
libuvc,
pthreads,
sdl2,
udev,
]
if libjpeg.found()
gui_deps += [libjpeg]
endif
gui = executable(
'monado-gui',
files(
'gui_sdl2.c',
'gui_sdl2_imgui.c',
'gui_sdl2_main.c',
'../../../external/imgui/imgui/cimgui_sdl.cpp',
'../../../external/imgui/imgui/imgui_impl_sdl.cpp',
'../../../external/imgui/imgui/imgui_impl_sdl.h',
),
link_whole: [
lib_aux_os,
lib_aux_ogl,
lib_aux_util,
lib_aux_math,
lib_st_prober,
lib_st_gui,
lib_target_instance_no_comp,
] + driver_libs,
include_directories: [
aux_include,
common_include,
glad_include,
st_include,
drv_include,
xrt_include,
imgui_include,
],
dependencies: gui_deps + driver_deps,
install: true,
)

View file

@ -1,113 +0,0 @@
# Copyright 2019-2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
driver_libs = []
driver_deps = []
if libusb.found()
driver_deps += [libusb]
endif
if libjpeg.found()
driver_deps += [libjpeg]
endif
if 'dummy' in drivers
driver_libs += [lib_drv_dummy]
endif
if 'hdk' in drivers
driver_libs += [lib_drv_hdk]
endif
if 'hydra' in drivers
driver_libs += [lib_drv_hydra]
endif
if 'ns' in drivers
driver_libs += [lib_drv_ns]
endif
if 'ohmd' in drivers
driver_libs += [lib_drv_ohmd]
endif
if 'handtracking' in drivers
driver_libs += [lib_drv_ht, lib_drv_cemu]
endif
if 'psmv' in drivers
driver_libs += [lib_drv_psmv]
endif
if 'psvr' in drivers
driver_libs += [lib_drv_psvr]
endif
if 'realsense' in drivers
driver_libs += [lib_drv_realsense]
driver_deps += [realsense]
endif
if 'v4l2' in drivers
driver_libs += [lib_drv_v4l2]
endif
if 'vf' in drivers
driver_libs += [lib_drv_vf]
endif
if 'vive' in drivers
driver_libs += [lib_drv_vive]
endif
if 'wmr' in drivers
driver_libs += [lib_drv_wmr]
endif
if 'survive' in drivers
driver_libs += [lib_drv_survive]
endif
if 'daydream' in drivers
driver_libs += [lib_drv_daydream]
endif
if 'arduino' in drivers
driver_libs += [lib_drv_arduino]
endif
if 'qwerty' in drivers
driver_libs += [lib_drv_qwerty]
endif
if 'remote' in drivers
driver_libs += [lib_drv_remote]
endif
if 'ulv2' in drivers
driver_libs += [lib_drv_ulv2]
endif
if 'euroc' in drivers
driver_libs += [lib_drv_euroc]
endif
driver_libs += [lib_drv_multi]
subdir('common')
subdir('openxr')
subdir('cli')
if get_option('gui').enabled() or (get_option('gui').auto() and sdl2.found())
subdir('gui')
endif
if get_option('service')
subdir('service')
subdir('ctl')
endif
if get_option('steamvr_plugin')
subdir('steamvr_drv')
endif

View file

@ -1,134 +0,0 @@
# Copyright 2019-2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
######
# Create a loadable OpenXR driver.
# runtime_bare_suffix = 'xrt'
# runtime_prefix = runtime_bare_prefix + '_'
runtime_prefix = ''
runtime_bare_suffix = 'monado'
runtime_suffix = '_' + runtime_bare_suffix
runtime_target = '@0@openxr@1@'.format(runtime_prefix, runtime_suffix)
# OpenXR 1.0
xr_api_major = 1
hack_deps = []
hack_src = [ 'oxr_sdl2_hack.c']
hack_libs = []
hack_incs = [
glad_include,
imgui_include,
]
if sdl2.found()
hack_deps += sdl2
hack_src += [
'../../../external/imgui/imgui/cimgui_sdl.cpp',
'../../../external/imgui/imgui/imgui_impl_sdl.cpp',
'../../../external/imgui/imgui/imgui_impl_sdl.h',
]
hack_libs += [lib_st_gui, lib_drv_qwerty]
hack_incs += [
st_include,
drv_qwerty_include,
]
endif
openxr_deps = [
libusb,
libuvc,
pthreads,
xrt_config_drivers,
xrt_config_have,
udev,
vulkan,
]
if build_opengl
openxr_deps += [opengl]
endif
if build_opengl and build_xlib
openxr_deps += [x11]
endif
if build_xcb
openxr_deps += [xcb]
endif
if build_xcb_xrandr_direct
openxr_deps += [xcb_randr]
endif
libs = [
lib_aux_vk,
lib_aux_os,
lib_aux_ogl,
lib_aux_util,
lib_aux_math,
lib_comp,
lib_st_oxr
] + hack_libs
if get_option('service')
libs += lib_ipc_client
else
libs += [
lib_target_instance,
driver_libs
]
endif
if 'remote' in drivers
libs += lib_drv_remote
endif
mapfile = 'libopenxr.version'
version_script_flag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
openxr = library(
runtime_target,
files(
'target.c',
hack_src,
),
link_whole: libs,
include_directories: [
openxr_include,
st_include, # Sigh debian meson requires this.
aux_include,
common_include,
drv_include,
xrt_include,
] + hack_incs,
dependencies: openxr_deps + driver_deps + hack_deps,
install: true,
link_args: version_script_flag,
link_depends: mapfile
)
manifest_in = files('../../../../cmake/openxr_monado.in.json')
manifest_conf = configuration_data()
# https://github.com/mesonbuild/meson/issues/5941
sopath = join_paths(get_option('prefix'),
get_option('libdir'), 'libopenxr_monado.so')
manifest_conf.set('runtime_path', sopath)
manifest_path = join_paths(
get_option('prefix'), get_option('datadir'), 'openxr', xr_api_major.to_string())
manifest_json = configure_file(
input: manifest_in,
output: 'openxr_monado.json',
configuration: manifest_conf,
install_dir: manifest_path,
)
if get_option('install-active-runtime')
meson.add_install_script('install_active_runtime.sh', get_option('sysconfdir'),
join_paths(manifest_path, runtime_target + '.json'), xr_api_major.to_string())
endif

View file

@ -1,83 +0,0 @@
# Copyright 2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
service_deps = [pthreads, libjpeg]
if systemd_dep.found() and not get_option('systemd').disabled()
service_deps += systemd_dep
endif
hack_deps = []
hack_src = [ '../openxr/oxr_sdl2_hack.c']
hack_libs = []
hack_incs = [
glad_include,
imgui_include,
]
if sdl2.found()
hack_deps += sdl2
hack_src += [
'../../../external/imgui/imgui/cimgui_sdl.cpp',
'../../../external/imgui/imgui/imgui_impl_sdl.cpp',
'../../../external/imgui/imgui/imgui_impl_sdl.h',
]
hack_libs += lib_st_gui
hack_incs += [
st_include,
drv_qwerty_include,
]
endif
service = executable(
'monado-service',
files(
'main.c',
hack_src
),
link_whole: [
lib_st_prober,
lib_ipc_server,
lib_comp,
lib_target_lists,
lib_target_instance,
lib_aux_util,
] + driver_libs + hack_libs,
include_directories: [
aux_include,
common_include,
xrt_include,
] + hack_incs,
dependencies: [pthreads, libjpeg] + hack_deps + service_deps,
install: true,
)
if systemd.found() and not get_option('systemd').disabled()
service_install_path = join_paths(get_option('prefix'), 'bin', 'monado-service')
systemd_user_services_dir = systemd.get_pkgconfig_variable('systemduserunitdir', define_variable : [ 'prefix', get_option('prefix')])
if get_option('systemd-user-unit-dir') != ''
systemd_user_services_dir = get_option('systemd-user-unit-dir')
endif
service_conf_data = configuration_data()
service_conf_data.set('UNIT_NAME', 'monado')
service_conf_data.set('conflicts', 'monado-dev')
service_conf_data.set('exit_on_disconnect', 'off')
service_conf_data.set('extra_desc', '')
service_conf_data.set('service_path', service_install_path)
configure_file(
input: 'monado.in.service',
output: 'monado.service',
configuration: service_conf_data,
install_dir: systemd_user_services_dir
)
socket_conf_data = configuration_data()
socket_conf_data.set('conflicts', 'monado-dev')
socket_conf_data.set('extra_desc', '')
configure_file(
input: 'monado.in.socket',
output: 'monado.socket',
configuration: socket_conf_data,
install_dir: systemd_user_services_dir
)
endif

View file

@ -1,95 +0,0 @@
# Copyright 2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
driver_monado = shared_library(
'driver_monado',
files(
'main.c'
),
link_whole: [
lib_target_instance_no_comp,
lib_st_ovrd,
],
include_directories: [
openvr_include,
st_ovrd_include,
openvr_include,
aux_include,
xrt_include,
],
link_with : driver_libs,
dependencies : [pthreads, libjpeg],
# build 'driver_monado.so' instead of 'libdriver_monado.so'
name_prefix: '',
)
if meson.version().version_compare('<0.56')
build_root = meson.build_root()
else
build_root = meson.project_build_root()
endif
plugin_dir = join_paths(build_root, 'steamvr-monado')
bindings_json_path = join_paths(aux_bindings_dir, 'bindings.json')
resources_dir = join_paths(plugin_dir, 'resources')
input_profile_dir = join_paths(resources_dir, 'input')
driver_manifest_path = join_paths(plugin_dir, 'driver.vrdrivermanifest')
copy_asset = find_program('copy_assets.py')
copy_plugin = find_program('copy_plugin.py')
generate_profiles = find_program(join_paths(aux_bindings_dir, 'steamvr_profiles.py'))
fake_driver_manifest = custom_target(
'driver_manifest_copy',
depends : driver_monado,
input : 'driver.vrdrivermanifest',
output : 'fake_driver_manifest',
command : [copy_asset, 'FILE', '@INPUT@', driver_manifest_path],
build_by_default : true
)
fake_driver_resources = custom_target(
'driver_resources_copy',
depends : driver_monado,
output : 'resources',
command : [copy_asset, 'DIRECTORY', join_paths(meson.current_source_dir(), 'resources'), resources_dir],
build_by_default : true
)
custom_target(
'driver_input_profiles_generate',
depends : driver_monado,
input : bindings_json_path,
output : 'fake_input_profiles_generate',
command : [generate_profiles, '@INPUT@', input_profile_dir],
build_by_default : true
)
plugin_archdir = ''
if host_machine.system() == 'windows'
if host_machine.cpu_family() == 'x86'
plugin_archdir = 'win32'
elif host_machine.cpu_family() == 'x86_64'
plugin_archdir = 'win64'
endif
elif host_machine.system() == 'linux'
if host_machine.cpu_family() == 'x86'
plugin_archdir = 'linux32'
elif host_machine.cpu_family() == 'x86_64'
plugin_archdir = 'linux64'
endif
endif
custom_target(
'plugin_copy',
depends : [driver_monado, fake_driver_manifest, fake_driver_resources],
input : driver_monado,
output : 'fake_plugin',
command : [copy_plugin, '@INPUT@', join_paths(plugin_dir, 'bin', plugin_archdir, '@PLAINNAME@')],
build_by_default : true
)
install_subdir(join_paths(plugin_dir), install_dir: join_paths(get_option('prefix'), 'share'))

View file

@ -1,28 +0,0 @@
# Copyright 2022, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
# Mercury hand tracking library!
t_ht_mercury_kine = static_library(
't_ht_mercury_kine',
files(
'kine/kinematic_interface.hpp',
'kine/kinematic_main.cpp'
),
include_directories: [xrt_include, cjson_include],
dependencies: [aux, eigen3]
)
t_ht_mercury = static_library(
't_ht_mercury',
files(
'hg_interface.h',
'hg_model.hpp',
'hg_sync.cpp',
'hg_sync.hpp',
),
link_with: [t_ht_mercury_kine],
include_directories: [xrt_include, cjson_include],
dependencies: [aux, onnxruntime, opencv, eigen3]
)

View file

@ -1,17 +0,0 @@
# Copyright 2022, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
subdir('old_rgb')
subdir('mercury')
###
# Async wrapper around sync helper.
#
lib_t_hand_async = static_library(
't_hand_async',
files(
't_hand_tracking_async.c'
),
include_directories: [xrt_include],
dependencies: [aux]
)

View file

@ -1,19 +0,0 @@
# Copyright 2022, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
# Old RGB hand tracking library.
lib_t_ht_old_rgb = static_library(
't_ht_old_rgb',
files(
'rgb_hand_math.hpp',
'rgb_image_math.hpp',
'rgb_interface.h',
'rgb_model.hpp',
'rgb_nms.hpp',
'rgb_sync.cpp',
'rgb_sync.hpp',
),
include_directories: [xrt_include, cjson_include],
dependencies: [aux, onnxruntime, opencv, eigen3]
)

View file

@ -1,6 +0,0 @@
# Copyright 2022, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
if 'handtracking' in drivers
subdir('hand')
endif

View file

@ -1,56 +0,0 @@
# Copyright 2020, Collabora, Ltd.
#
# SPDX-License-Identifier: BSL-1.0
tests_main = static_library(
'tests_main',
files(
'tests_main.cpp'
),
include_directories: [
catch2_include,
]
)
hack_deps = []
hack_src = [ '../src/xrt/targets/openxr/oxr_sdl2_hack.c']
hack_libs = []
hack_incs = [
glad_include,
imgui_include,
]
if sdl2.found()
hack_deps += sdl2
hack_src += [
'../src/external/imgui/imgui/cimgui_sdl.cpp',
'../src/external/imgui/imgui/imgui_impl_sdl.cpp',
'../src/external/imgui/imgui/imgui_impl_sdl.h',
]
hack_libs += lib_st_gui
hack_incs += [
st_include,
drv_qwerty_include,
]
endif
tests_input_transform = executable(
'tests_input_transform',
files(
'tests_input_transform.cpp',
hack_src,
),
include_directories: [
xrt_include,
aux_include,
st_include,
openxr_include,
catch2_include,
] + hack_incs,
dependencies: [pthreads, driver_deps, compositor_deps, aux_ogl, aux_vk] + hack_deps,
link_whole: [lib_target_instance_no_comp, lib_st_oxr, lib_comp, driver_libs, tests_main] + hack_libs,
)
test('tests_input_transform', tests_input_transform)