Merge branch 'debian/sid' into debian/buster-backports

This commit is contained in:
Ryan Pavlik 2021-10-26 17:13:57 -05:00
commit 7058a4e80f
646 changed files with 45400 additions and 8931 deletions

View file

@ -1,8 +1,8 @@
# To use this config on you editor, follow the instructions at:
# To use this config on your editor, follow the instructions at:
# http://editorconfig.org
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: 2018-2020 Collabora, Ltd. and the Monado contributors
# SPDX-FileCopyrightText: 2018-2021 Collabora, Ltd. and the Monado contributors
root = true
@ -13,7 +13,7 @@ insert_final_newline = true
[*.{c,h,cpp}]
indent_style = tab
indent_size = 8
max_line_length = 80
max_line_length = 120
[*.py]
indent_size = 4

24
.gitignore vendored
View file

@ -9,19 +9,34 @@ CMakeLists.txt.user.*
*Makefile
*cmake_install.cmake
*libopenxr_monado.so
*.a
CMakeDoxyfile.in
CMakeDoxygenDefaults.cmake
CTestTestfile.cmake
DartConfiguration.tcl
doc/Doxyfile
doc/html/
doc/latex/
openxr_monado-dev.json
openxr_monado.json
src/xrt/auxiliary/bindings/b_generated_bindings.*
src/xrt/auxiliary/u_git_tag.c
src/xrt/compositor/shaders/*.vert.h
src/xrt/compositor/shaders/*.frag.h
src/xrt/compositor/shaders/*.comp.h
src/xrt/include/xrt/xrt_config_*.h
src/xrt/ipc/*_generated.*
src/xrt/targets/cli/monado-cli
src/xrt/targets/ctl/monado-ctl
src/xrt/targets/gui/monado-gui
src/xrt/targets/service/monado-service
src/xrt/targets/openxr/active_runtime.cmake
src/xrt/targets/openxr/intermediate_manifest.json
src/xrt/targets/openxr/make_manifest.cmake
src/xrt/targets/targets_enabled_drivers.h
steamvr-monado/
tests/tests_generic_callbacks
tests/tests_input_transform
# Ignore Python caches
__pycache__/
@ -71,7 +86,16 @@ local.properties
.cxx
.settings
.project
.classpath
gradlew
gradlew.bat
gradle-wrapper.jar
# Ignore Sourcetrail things
*.srctrlbm
*.srctrldb
*.srctrlprj
# Ignore clangd things
.cache/

View file

@ -1,32 +1,46 @@
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: 2018-2020 Collabora, Ltd. and the Monado contributors
# SPDX-FileCopyrightText: 2018-2021 Collabora, Ltd. and the Monado contributors
variables:
FDO_UPSTREAM_REPO: monado/monado
.templates_sha: &templates_sha 322bf2b8f29b6491caeb13861201e96969ddc169
.package_only_branch: &package_only_branch master
.templates_sha: &templates_sha db8eb22cd1abb036560faaebd36a38565a3ebda2
# Variables listing packages for Debian-based distros
.monado.variables.debian-based-packages:
variables:
CORE_REQUIRED_PACKAGES: "build-essential git wget unzip cmake meson ninja-build libeigen3-dev curl patch python3 pkg-config libx11-dev libx11-xcb-dev libxxf86vm-dev libxrandr-dev libxcb-randr0-dev libvulkan-dev glslang-tools libglvnd-dev libgl1-mesa-dev ca-certificates libusb-1.0-0-dev libudev-dev"
FEATURE_PACKAGES: "libhidapi-dev libwayland-dev libuvc-dev libavcodec-dev libopencv-dev libv4l-dev libcjson-dev libsdl2-dev libegl1-mesa-dev libdbus-1-dev"
PACKAGING_PACKAGES: "devscripts debhelper osc osc-plugins-dput dput-ng gettext-base markdown"
# Packages required for build and some other basic jobs
CORE_REQUIRED_PACKAGES: "build-essential git wget unzip cmake meson ninja-build libeigen3-dev curl patch python3 pkg-config libx11-dev libx11-xcb-dev libxxf86vm-dev libxrandr-dev libxcb-randr0-dev libvulkan-dev glslang-tools libglvnd-dev libgl1-mesa-dev ca-certificates libusb-1.0-0-dev libudev-dev"
# These are optional packages, that we're building against to ensure we build as much code as possible
FEATURE_PACKAGES: "libhidapi-dev libwayland-dev libuvc-dev libavcodec-dev libopencv-dev libv4l-dev libcjson-dev libsdl2-dev libegl1-mesa-dev libdbus-1-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsystemd-dev libbsd-dev"
# Only used for building packages
PACKAGING_PACKAGES: "devscripts debhelper dput-ng gettext-base markdown doxygen graphviz"
# Used for ancillary "not compilation" jobs/features, like docs, changelogs, formatting, etc.
TOOLS_REQUIRED_PACKAGES: "clang-format-7 codespell doxygen graphviz python3-pip python3-click"
# The NDK builder uses only these packages
NDK_PACKAGES: "git wget unzip cmake meson ninja-build libeigen3-dev python3 pkg-config ca-certificates glslang-tools"
# Variables for build and usage of Debian 10 (Buster) image
.monado.variables.debian:buster:
variables:
FDO_DISTRIBUTION_VERSION: buster
FDO_DISTRIBUTION_TAG: "2020-07-10.0"
FDO_DISTRIBUTION_TAG: "2021-04-15.0"
# Variables for build and usage of Ubuntu 20.04 LTS (Focal) image
.monado.variables.ubuntu:focal:
variables:
FDO_DISTRIBUTION_VERSION: "20.04"
FDO_DISTRIBUTION_TAG: "2020-07-10.0"
FDO_DISTRIBUTION_TAG: "2021-04-15.0"
# Variables for build and usage of Ubuntu 20.10 (Groovy) image
.monado.variables.ubuntu:groovy:
variables:
FDO_DISTRIBUTION_VERSION: "20.10"
FDO_DISTRIBUTION_TAG: "2021-04-15.0"
# Variables for build and usage of Debian 10 (Buster) + Android NDK image
.monado.variables.debian:buster-ndk:
@ -38,7 +52,7 @@ variables:
# Variables for build and usage of Arch Linux image
.monado.variables.arch:rolling:
variables:
FDO_DISTRIBUTION_TAG: "2020-05-12.0"
FDO_DISTRIBUTION_TAG: "2021-09-14.0"
include:
- project: "freedesktop/ci-templates"
@ -95,7 +109,7 @@ arch:container_prep:
FDO_DISTRIBUTION_PACKAGES: "git gcc clang cmake meson ninja pkgconfig python3 diffutils patch doxygen graphviz eigen hidapi libxrandr mesa glslang vulkan-headers vulkan-icd-loader check glfw-x11 libusb opencv gtk3 ffmpeg v4l-utils qt5-base"
# Ubuntu Focal (x64)
ubuntu:container_prep:
ubuntu:focal:container_prep:
stage: container_prep
extends:
- .monado.variables.ubuntu:focal
@ -106,6 +120,18 @@ ubuntu:container_prep:
# a list of packages to install - assembled from .monado.variables.debian-based-packages
FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES} ${TOOLS_REQUIRED_PACKAGES}"
# Ubuntu Groovy (x64)
ubuntu:groovy:container_prep:
stage: container_prep
extends:
- .monado.variables.ubuntu:groovy
- .monado.variables.container-prep-base
- .monado.variables.debian-based-packages
- .fdo.container-build@ubuntu # from ci-templates
variables:
# a list of packages to install - assembled from .monado.variables.debian-based-packages
FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES}"
# Debian Buster + the Android NDK in /opt/android-ndk
# The NDK itself gets installed by .gitlab-ci/ndk:container_prep.sh
ndk:container_prep:
@ -117,7 +143,7 @@ ndk:container_prep:
variables:
# Repo suffix is set in .monado.variables.debian:buster-ndk
# a list of packages to install
FDO_DISTRIBUTION_PACKAGES: "git wget unzip cmake meson ninja-build libeigen3-dev python3 pkg-config ca-certificates glslang-tools"
FDO_DISTRIBUTION_PACKAGES: "${NDK_PACKAGES}"
# Style check job
format-and-spellcheck:
@ -133,10 +159,20 @@ format-and-spellcheck:
expire_in: 1 week
when: on_failure
# Verify REUSE compliance
reuse:
stage: build
image:
name: fsfe/reuse:latest
entrypoint: [""]
script:
- reuse lint
# "Base" job for a CMake build
.monado.base-job.build-cmake:
stage: build
script:
- rm -rf build
- mkdir build
- pushd build
- cmake -GNinja .. $CMAKE_ARGS
@ -149,6 +185,7 @@ format-and-spellcheck:
.monado.base-job.build-meson:
stage: build
script:
- rm -rf build
- mkdir build
- pushd build
- meson .. $MESON_ARGS
@ -260,11 +297,46 @@ debian:cmake:32bit:
# OpenCV and local OpenHMD doesn't play nicely with us in multi-arch.
CMAKE_ARGS: -DCMAKE_TOOLCHAIN_FILE=../.gitlab-ci/i386.cmake -DXRT_HAVE_OPENCV=off -DXRT_BUILD_DRIVER_OHMD=off
# Base of Android NDK builds.
# Takes the last :-delimited part of the name as the ABI to build for,
# so you don't need to do anything other than "extends" in the job
.monado.ndk:build-base:
stage: build
extends:
- .monado.variables.debian:buster-ndk
- .fdo.suffixed-image@debian # from ci-templates
variables:
ANDROID_PLATFORM: 26
script:
- mkdir build
- pushd build
# This extracts the ABI from the job name
- export ABI=$(echo $CI_JOB_NAME | cut --delimiter=":" -f 2)
# Note we are pointing CMake to the host install of Eigen3 because it's header-only
# and thus this is safe to do.
- cmake -GNinja .. -DANDROID_PLATFORM=$ANDROID_PLATFORM -DANDROID_ABI=$ABI -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk/build/cmake/android.toolchain.cmake -DEigen3_DIR=/usr/lib/cmake/eigen3/
- grep "^XRT_" CMakeCache.txt
- ninja
ndk:armeabi-v7a:
extends: .monado.ndk:build-base
ndk:arm64-v8a:
extends: .monado.ndk:build-base
# Packaging
.monado.packaging.conditions:
rules:
# Only the default branch of the "upstream" repo.
- if: "$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH"
when: on_success
# Otherwise, don't build packages.
- when: never
.monado.base-job.debuild:
extends:
- .monado.packaging.conditions
stage: package
only:
- *package_only_branch
before_script:
# Configure git - needed despite not actually committing here.
- git config --global user.email "ryan.pavlik@collabora.com"
@ -273,7 +345,7 @@ debian:cmake:32bit:
# Prep the source tree
- git clean -dfx
- git merge origin/${PACKAGE_BRANCH} --no-commit
- FULLNAME="Monado CI <ryan.pavlik@collabora.com>" debian/extra/prepare-commit-package.sh ${CI_COMMIT_SHA} 1~${BACKPORT_SUFFIX}~ci$(date --utc "+%Y%m%d")
- DEBFULLNAME="Monado CI" DEBEMAIL="ryan.pavlik@collabora.com" debian/extra/prepare-commit-package.sh ${CI_COMMIT_SHA} 1~${BACKPORT_SUFFIX}~ci$(date --utc "+%Y%m%d")
# Build the package
- debuild -uc -us
# Use dput-ng to move the package-related files into some artifacts.
@ -308,16 +380,27 @@ ubuntu:focal:package:
PACKAGE_BRANCH: ubuntu/focal
DISTRO: focal
ubuntu:groovy:package:
extends:
- .monado.variables.ubuntu:groovy
- .fdo.distribution-image@ubuntu # from ci-templates
- .monado.base-job.debuild
variables:
BACKPORT_SUFFIX: ubuntu20.04
PACKAGE_BRANCH: ubuntu/focal
DISTRO: focal
reprepro:package:
stage: reprepro
only:
- *package_only_branch
extends:
- .monado.variables.debian:buster
- .monado.packaging.conditions
- .fdo.distribution-image@debian # from ci-templates
dependencies:
- debian:buster:package
- ubuntu:focal:package
- ubuntu:groovy:package
before_script:
# Convince gnupg to work properly in CI
- mkdir -p ~/.gnupg && chmod 700 ~/.gnupg
@ -353,33 +436,6 @@ reprepro:package:
- "repo/"
expire_in: 2 days
# Base of Android NDK builds.
# Takes the last :-delimited part of the name as the ABI to build for,
# so you don't need to do anything other than "extends" in the job
.monado.ndk:build-base:
stage: build
extends:
- .monado.variables.debian:buster-ndk
- .fdo.suffixed-image@debian # from ci-templates
variables:
ANDROID_PLATFORM: 26
script:
- mkdir build
- pushd build
# This extracts the ABI from the job name
- export ABI=$(echo $CI_JOB_NAME | cut --delimiter=":" -f 2)
# Note we are pointing CMake to the host install of Eigen3 because it's header-only
# and thus this is safe to do.
- cmake -GNinja .. -DANDROID_PLATFORM=$ANDROID_PLATFORM -DANDROID_ABI=$ABI -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk/build/cmake/android.toolchain.cmake -DEigen3_DIR=/usr/lib/cmake/eigen3/
- grep "^XRT_" CMakeCache.txt
- ninja
ndk:armeabi-v7a:
extends: .monado.ndk:build-base
ndk:arm64-v8a:
extends: .monado.ndk:build-base
###
# Pages
###

View file

@ -0,0 +1,5 @@
#!/bin/bash
# Copyright 2021, Collabora, Ltd. and the Monado contributors
# SPDX-License-Identifier: BSL-1.0
# Nothing really needed.

View file

@ -10,17 +10,11 @@ Files: doc/changes/drivers/*
doc/changes/xrt/*
doc/changes/auxiliary/*
doc/changes/compositor/*
Copyright: 2020, Collabora, Ltd. and the Monado contributors
doc/changes/big/*
Copyright: 2020-2021, Collabora, Ltd. and the Monado contributors
License: CC0-1.0
Comment: Prevents needing a license header per fragment between releases.
Files: src/external/flexkalman/.clang-format
src/external/flexkalman/flexkalman/README.md
Copyright: 2015, 2016, Sensics, Inc.
2019, Collabora, Ltd.
License: Apache-2.0
Comment: Copyright statement and license identifier missing.
Files: src/external/cjson/*
Copyright: 2009-2017, Dave Gamble and cJSON contributors
License: MIT
@ -32,14 +26,6 @@ Copyright: 2020, Two Blue Cubes Ltd.
License: BSL-1.0
Comment: SPDX-License-Identifier missing.
Files: src/external/openxr_includes/loader_interfaces.h
Copyright: 2017, LunarG, Inc.
2017, Valve Corporation
2017-2019, The Khronos Group Inc.
License: Apache-2.0
Comment: SPDX-License-Identifier missing.
Files: src/external/jnipp/*
Copyright: 2016-2020, Mitchell Dowd
2020, Collabora, Ltd.
@ -52,6 +38,11 @@ Copyright: 2016, mcximing
License: BSD-2-Clause
Comment: SPDX-License-Identifier missing.
Files: src/external/openvr_includes/*
Copyright: 2015-2020, Valve Corporation
License: BSD-3-Clause
Comment: License identifier missing.
Files: src/external/imgui/imgui*
src/external/imgui/imconfig.h
Copyright: 2014-2020, Omar Cornut

View file

@ -1,4 +1,4 @@
# Copyright 2018-2020, Collabora, Ltd.
# Copyright 2018-2021, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
cmake_minimum_required(VERSION 3.10.2)
@ -12,10 +12,18 @@ endif()
option(XRT_OPENXR_INSTALL_ABSOLUTE_RUNTIME_PATH "Use the absolute path to the runtime in the installed manifest, rather than a bare filename." ON)
option(XRT_OPENXR_INSTALL_ACTIVE_RUNTIME "Make Monado the default OpenXR runtime on install" ON)
# We use C++17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# So that clangd/Intellisense/Sourcetrail know how to parse our code.
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
###
# Dependencies
###
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/sanitizers")
include(CMakeDependentOption)
include(SPIR-V)
include(GNUInstallDirs)
@ -26,36 +34,46 @@ if(NOT ${CMAKE_VERSION} VERSION_LESS 3.9)
check_ipo_supported(RESULT HAS_IPO)
endif()
# Redundant mention of version is required because module defaults to looking for 2.91-compatible,
# which the config file for a 3.x says it's not compatible with.
find_package(Eigen3 3 REQUIRED)
find_package(Vulkan)
find_package(EGL)
find_package(HIDAPI)
find_package(OpenHMD)
find_package(OpenCV COMPONENTS core calib3d highgui imgproc imgcodecs features2d video CONFIG)
find_package(Libusb1)
find_package(JPEG)
find_package(realsense2 CONFIG)
find_package(SDL2 CONFIG)
find_package(ZLIB)
find_package(cJSON)
find_package(Systemd)
find_package(OpenGLES COMPONENTS V3)
# Android SDK doesn't look for 3.8 and 3.9, which is what new distros ship with.
set(Python_ADDITIONAL_VERSIONS 3.8 3.9)
if(NOT CMAKE_VERSION VERSION_LESS 3.12)
find_package(Python3 REQUIRED Interpreter)
set(PYTHON_EXECUTABLE Python3::Interpreter)
else()
find_package(PythonInterp REQUIRED VERSION 3)
find_program(PYTHON_EXECUTABLE python3)
if(PYTHON_EXECUTABLE MATCHES "WindowsApps")
# If you hit this error, you will have to install Python 3 or try harder to tell CMake where it is.
message(FATAL_ERROR "Found WindowsApps alias for Python. Make sure Python3 is installed, then choose 'Manage App Execution Aliases' in Start and disable the aliases for Python.")
endif()
endif()
# Redundant mention of version is required because module defaults to looking for 2.91-compatible,
# which the config file for a 3.x says it's not compatible with.
find_package(Eigen3 3 REQUIRED)
find_package(Vulkan MODULE)
find_package(EGL MODULE)
find_package(HIDAPI MODULE)
find_package(OpenHMD MODULE)
find_package(OpenCV COMPONENTS core calib3d highgui imgproc imgcodecs features2d video CONFIG)
find_package(Libusb1 MODULE)
find_package(JPEG MODULE)
find_package(realsense2 CONFIG)
find_package(depthai CONFIG)
find_package(SDL2 CONFIG)
find_package(ZLIB MODULE)
find_package(cJSON MODULE)
find_package(Systemd MODULE)
find_package(OpenGLES MODULE COMPONENTS V3)
find_package(LeapV2 MODULE)
find_package(ONNXRuntime MODULE)
find_package(Percetto MODULE)
if(NOT ANDROID)
find_package(PkgConfig MODULE)
endif()
#https://github.com/arsenm/sanitizers-cmake
find_package(Sanitizers MODULE)
add_library(xrt-pthreads INTERFACE)
if(WIN32)
find_package(pthreads_windows REQUIRED)
@ -66,7 +84,7 @@ else()
target_link_libraries(xrt-pthreads INTERFACE Threads::Threads)
endif()
if(NOT ANDROID)
if(PKGCONFIG_FOUND AND NOT ANDROID)
# @TODO Turn into a find_package LIBUVC file.
pkg_check_modules(LIBUVC libuvc)
@ -79,7 +97,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(XRT_HAVE_LINUX YES)
# Compositor backend
find_package(X11)
find_package(PkgConfig)
find_package(udev REQUIRED)
set(XRT_HAVE_V4L2 TRUE)
@ -91,9 +108,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
pkg_search_module(WAYLAND wayland-client)
pkg_search_module(WAYLAND_SCANNER wayland-scanner)
pkg_search_module(WAYLAND_PROTOCOLS wayland-protocols)
pkg_search_module(LIBDRM libdrm)
endif()
find_package(OpenGL COMPONENTS GLX)
pkg_search_module(DBUS dbus-1)
pkg_search_module(LIBBSD libbsd)
pkg_check_modules(GST
gstreamer-1.0
@ -112,13 +131,31 @@ if(ANDROID)
find_library(ANDROID_LOG_LIBRARY log)
endif()
# Find a external SLAM implementation
set(EXTERNAL_SLAM_SYSTEMS kimera_vio)
foreach(slam_system IN LISTS EXTERNAL_SLAM_SYSTEMS)
if(PKGCONFIG_FOUND)
pkg_check_modules(${slam_system} ${slam_system})
endif()
if(${slam_system}_FOUND)
set(SLAM ON)
set(SLAM_NAME ${slam_system})
set(SLAM_LIBRARIES ${${slam_system}_LIBRARIES})
set(SLAM_INCLUDE_DIRS ${${slam_system}_INCLUDE_DIRS})
break()
endif()
endforeach()
# This one is named differently because that's what CTest uses
option(BUILD_TESTING "Enable building of the test suite?" ON)
option(XRT_FEATURE_COLOR_LOG "Enable logging in color on supported platforms" ON)
cmake_dependent_option(XRT_HAVE_PERCETTO "Enable percetto support" ON "PERCETTO_FOUND" OFF)
cmake_dependent_option(XRT_FEATURE_TRACING "Enable debug tracing on supported platforms" OFF "XRT_HAVE_PERCETTO" OFF)
cmake_dependent_option(CMAKE_INTERPROCEDURAL_OPTIMIZATION "Enable inter-procedural (link-time) optimization" OFF "HAS_IPO" OFF)
cmake_dependent_option(XRT_HAVE_WAYLAND "Enable Wayland support" ON "WAYLAND_FOUND AND WAYLAND_SCANNER_FOUND AND WAYLAND_PROTOCOLS_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_WAYLAND "Enable Wayland support" ON "WAYLAND_FOUND AND WAYLAND_SCANNER_FOUND AND WAYLAND_PROTOCOLS_FOUND AND LIBDRM_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_WAYLAND_DIRECT "Enable Wayland direct support" ON "XRT_HAVE_WAYLAND AND LIBDRM_FOUND AND WAYLAND_PROTOCOLS_VERSION VERSION_GREATER_EQUAL 1.22" OFF)
cmake_dependent_option(XRT_HAVE_XLIB "Enable xlib support" ON "X11_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_XRANDR "Enable xlib-xrandr support" ON "XRANDR_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_XCB "Enable xcb support" ON "XCB_FOUND" OFF)
@ -128,10 +165,10 @@ cmake_dependent_option(XRT_HAVE_OPENGL "Enable OpenGL Graphics API support" ON "
cmake_dependent_option(XRT_HAVE_OPENGLES "Enable OpenGL-ES Graphics API support" ON "OpenGLES_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_EGL "Enable OpenGL on EGL Graphics API support" ON "EGL_FOUND; XRT_HAVE_OPENGL OR XRT_HAVE_OPENGLES" OFF)
cmake_dependent_option(XRT_HAVE_DBUS "Enable dbus support (for BLE support)" ON "DBUS_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_VF "Enable gstreamer support (for video file support)" ON "GST_FOUND" OFF)
cmake_dependent_option(XRT_FEATURE_COMPOSITOR_MAIN "Build main compositor host functionality" ON "XRT_HAVE_VULKAN; XRT_HAVE_WAYLAND OR XRT_HAVE_XCB OR ANDROID OR WIN32" OFF)
cmake_dependent_option(XRT_HAVE_LIBBSD "Enable libbsd support" ON "LIBBSD_FOUND" OFF)
cmake_dependent_option(XRT_FEATURE_OPENXR "Build OpenXR runtime target" ON "XRT_FEATURE_COMPOSITOR_MAIN" OFF)
cmake_dependent_option(XRT_FEATURE_SERVICE "Enable separate service module for OpenXR runtime" ON "NOT WIN32" OFF)
cmake_dependent_option(XRT_FEATURE_SERVICE "Enable separate service module for OpenXR runtime" ON "NOT WIN32 AND XRT_FEATURE_OPENXR" OFF)
cmake_dependent_option(XRT_HAVE_SYSTEMD "Enable systemd support (for socket activation of service)" ON "Systemd_FOUND AND XRT_FEATURE_SERVICE" OFF)
cmake_dependent_option(XRT_INSTALL_SYSTEMD_UNIT_FILES "Install user unit files for systemd socket activation on installation" ON "XRT_HAVE_SYSTEMD" OFF)
cmake_dependent_option(XRT_INSTALL_ABSOLUTE_SYSTEMD_UNIT_FILES "Use an absolute path to monado-system in installed user unit files for systemd socket activation" ON "XRT_INSTALL_SYSTEMD_UNIT_FILES" OFF)
@ -172,30 +209,37 @@ cmake_dependent_option(XRT_HAVE_LIBUVC "Enable libuvc video driver" ON "LIBUVC_F
cmake_dependent_option(XRT_HAVE_FFMPEG "Enable ffmpeg testing video driver" ON "FFMPEG_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_SDL2 "Enable use of SDL2" ON "SDL2_FOUND AND XRT_HAVE_OPENGL" OFF)
cmake_dependent_option(XRT_HAVE_SYSTEM_CJSON "Enable cJSON from system, instead of bundled source" ON "CJSON_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_GST "Enable gstreamer" ON "GST_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_ONNXRUNTIME "Enable ONNX runtime support" ON "ONNXRUNTIME_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_KIMERA_SLAM "Enable Kimera support" ON "kimera_vio_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_SLAM "Enable SLAM tracking support" ON "SLAM;XRT_HAVE_OPENCV" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_PSVR "Enable PSVR HMD driver" ON "HIDAPI_FOUND" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_RS "Enable RealSense device driver" ON "realsense2_FOUND" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_VIVE "Enable driver for HTC Vive, Vive Pro, Valve Index, and their controllers" ON "ZLIB_FOUND AND XRT_HAVE_LINUX" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_OHMD "Enable OpenHMD driver" ON "OPENHMD_FOUND" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_HANDTRACKING "Enable Camera Hand Tracking driver" ON "XRT_HAVE_V4L2" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_HANDTRACKING "Enable Camera Hand Tracking driver" ON "XRT_HAVE_ONNXRUNTIME AND XRT_HAVE_OPENCV AND XRT_HAVE_V4L2" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_DAYDREAM "Enable the Google Daydream View controller driver (BLE, via D-Bus)" ON "XRT_HAVE_DBUS" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_ARDUINO "Enable Arduino input device with BLE via via D-Bus" ON "XRT_HAVE_DBUS" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_ILLIXR "Enable ILLIXR driver" ON "ILLIXR_PATH" OFF)
option(XRT_BUILD_DRIVER_DUMMY "Enable dummy driver" ON)
cmake_dependent_option(XRT_BUILD_DRIVER_ULV2 "Enable Ultraleap v2 driver" ON "LeapV2_FOUND" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_REMOTE "Enable remote debugging driver" ON "XRT_HAVE_LINUX OR ANDROID" OFF)
option(XRT_BUILD_DRIVER_WMR "Enable Windows Mixed Reality driver" ON)
# These all use the Monado internal hid wrapper.
cmake_dependent_option(XRT_BUILD_DRIVER_HDK "Enable HDK driver" ON "XRT_HAVE_INTERNAL_HID" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_PSMV "Enable Playstation Move driver" ON "XRT_HAVE_INTERNAL_HID" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_HYDRA "Enable Hydra driver" ON "XRT_HAVE_INTERNAL_HID" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_NS "Enable North Star driver" ON "XRT_HAVE_INTERNAL_HID" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_VF "Build video frame driver (for video file support, uses gstreamer)" ON "XRT_HAVE_GST" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_DEPTHAI "DepthAI" ON "depthai_FOUND" OFF)
# This one defaults to off, even if we find the deps.
cmake_dependent_option(XRT_BUILD_DRIVER_SURVIVE "Enable libsurvive driver" ON "SURVIVE_FOUND" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_ANDROID "Enable Android sensors driver" ON "ANDROID" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_QWERTY "Enable Qwerty driver" ON "XRT_HAVE_SDL2" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_EUROC "Enable EuRoC dataset driver for SLAM evaluation" ON "XRT_HAVE_OPENCV" OFF)
# 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!
@ -216,7 +260,13 @@ list(APPEND AVAILABLE_DRIVERS
"REMOTE"
"SURVIVE"
"V4L2"
"ULV2"
"VF"
"DEPTHAI"
"VIVE"
"QWERTY"
"WMR"
"EUROC"
)
@ -290,6 +340,17 @@ if(CMAKE_INTERPROCEDURAL_OPTIMIZATION)
message(STATUS "Inter-procedural optimization enabled")
endif()
# Make sure we have pretty colours
option (FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." FALSE)
if ("${FORCE_COLORED_OUTPUT}")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options (-fdiagnostics-color=always)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options (-fcolor-diagnostics)
endif ()
endif ()
###
# Decend into madness.
###
@ -298,30 +359,37 @@ add_subdirectory(src)
add_subdirectory(doc)
if(BUILD_TESTING)
include(CTest)
add_subdirectory(tests)
include(CTest)
add_subdirectory(tests)
endif()
message(STATUS "#####----- Config -----#####")
message(STATUS "# GIT_DESC: ${GIT_DESC}")
message(STATUS "# GIT_DESC: ${GIT_DESC}")
message(STATUS "#")
message(STATUS "# WAYLAND: ${XRT_HAVE_WAYLAND}")
message(STATUS "# XLIB: ${XRT_HAVE_XLIB}")
message(STATUS "# XRANDR: ${XRT_HAVE_XRANDR}")
message(STATUS "# XCB: ${XRT_HAVE_XCB}")
message(STATUS "# OPENGL: ${XRT_HAVE_OPENGL}")
message(STATUS "# OPENGLES: ${XRT_HAVE_OPENGLES}")
message(STATUS "# VULKAN: ${XRT_HAVE_VULKAN}")
message(STATUS "# EGL: ${XRT_HAVE_EGL}")
message(STATUS "# DBUS: ${XRT_HAVE_DBUS}")
message(STATUS "# VF: ${XRT_HAVE_VF}")
message(STATUS "# LIBUSB: ${XRT_HAVE_LIBUSB}")
message(STATUS "# JPEG: ${XRT_HAVE_JPEG}")
message(STATUS "# OPENCV: ${XRT_HAVE_OPENCV}")
message(STATUS "# LIBUVC: ${XRT_HAVE_LIBUVC}")
message(STATUS "# FFMPEG: ${XRT_HAVE_FFMPEG}")
message(STATUS "# SDL2: ${XRT_HAVE_SDL2}")
message(STATUS "# SYSTEM_CJSON: ${XRT_HAVE_SYSTEM_CJSON}")
message(STATUS "# GST (GStreamer): ${XRT_HAVE_GST}")
message(STATUS "# WAYLAND: ${XRT_HAVE_WAYLAND}")
message(STATUS "# WAYLAND_DIRECT: ${XRT_HAVE_WAYLAND_DIRECT}")
message(STATUS "# XLIB: ${XRT_HAVE_XLIB}")
message(STATUS "# XRANDR: ${XRT_HAVE_XRANDR}")
message(STATUS "# XCB: ${XRT_HAVE_XCB}")
message(STATUS "# VULKAN: ${XRT_HAVE_VULKAN}")
message(STATUS "# OPENGL: ${XRT_HAVE_OPENGL}")
message(STATUS "# OPENGLES: ${XRT_HAVE_OPENGLES}")
message(STATUS "# EGL: ${XRT_HAVE_EGL}")
message(STATUS "# DBUS: ${XRT_HAVE_DBUS}")
message(STATUS "# LIBBSD: ${XRT_HAVE_LIBBSD}")
message(STATUS "# SYSTEMD: ${XRT_HAVE_SYSTEMD}")
message(STATUS "# LIBUSB: ${XRT_HAVE_LIBUSB}")
message(STATUS "# JPEG: ${XRT_HAVE_JPEG}")
message(STATUS "# OPENCV: ${XRT_HAVE_OPENCV}")
message(STATUS "# LIBUVC: ${XRT_HAVE_LIBUVC}")
message(STATUS "# FFMPEG: ${XRT_HAVE_FFMPEG}")
message(STATUS "# SDL2: ${XRT_HAVE_SDL2}")
message(STATUS "# PERCETTO: ${XRT_HAVE_PERCETTO}")
message(STATUS "# ONNXRUNTIME: ${XRT_HAVE_ONNXRUNTIME}")
message(STATUS "# SYSTEM_CJSON: ${XRT_HAVE_SYSTEM_CJSON}")
message(STATUS "# KIMERA: ${XRT_HAVE_KIMERA_SLAM}")
message(STATUS "# SLAM: ${XRT_HAVE_SLAM}")
message(STATUS "#")
message(STATUS "# FEATURE_COMPOSITOR_MAIN: ${XRT_FEATURE_COMPOSITOR_MAIN}")
message(STATUS "# FEATURE_SERVICE: ${XRT_FEATURE_SERVICE}")
@ -332,6 +400,8 @@ message(STATUS "# FEATURE_OPENXR_LAYER_CYLINDER: ${XRT_FEATURE_OPENXR_
message(STATUS "# FEATURE_OPENXR_LAYER_EQUIRECT2: ${XRT_FEATURE_OPENXR_LAYER_EQUIRECT2}")
message(STATUS "# FEATURE_OPENXR_LAYER_EQUIRECT1: ${XRT_FEATURE_OPENXR_LAYER_EQUIRECT1}")
message(STATUS "# FEATURE_STEAMVR_PLUGIN: ${XRT_FEATURE_STEAMVR_PLUGIN}")
message(STATUS "# FEATURE_COLOR_LOG: ${XRT_FEATURE_COLOR_LOG}")
message(STATUS "# FEATURE_TRACING: ${XRT_FEATURE_TRACING}")
message(STATUS "#")
message(STATUS "# DRIVER_ANDROID: ${XRT_BUILD_DRIVER_ANDROID}")
message(STATUS "# DRIVER_ARDUINO: ${XRT_BUILD_DRIVER_ARDUINO}")
@ -342,11 +412,21 @@ message(STATUS "# DRIVER_HDK: ${XRT_BUILD_DRIVER_HDK}")
message(STATUS "# DRIVER_HYDRA: ${XRT_BUILD_DRIVER_HYDRA}")
message(STATUS "# DRIVER_ILLIXR: ${XRT_BUILD_DRIVER_ILLIXR}")
message(STATUS "# DRIVER_NS: ${XRT_BUILD_DRIVER_NS}")
message(STATUS "# DRIVER_ULV2: ${XRT_BUILD_DRIVER_ULV2}")
message(STATUS "# DRIVER_OHMD: ${XRT_BUILD_DRIVER_OHMD}")
message(STATUS "# DRIVER_PSMV: ${XRT_BUILD_DRIVER_PSMV}")
message(STATUS "# DRIVER_PSVR: ${XRT_BUILD_DRIVER_PSVR}")
message(STATUS "# DRIVER_RS: ${XRT_BUILD_DRIVER_RS}")
message(STATUS "# DRIVER_REMOTE: ${XRT_BUILD_DRIVER_REMOTE}")
message(STATUS "# DRIVER_SURVIVE: ${XRT_BUILD_DRIVER_SURVIVE}")
message(STATUS "# DRIVER_VF: ${XRT_BUILD_DRIVER_VF}")
message(STATUS "# DRIVER_DEPTHAI: ${XRT_BUILD_DRIVER_DEPTHAI}")
message(STATUS "# DRIVER_VIVE: ${XRT_BUILD_DRIVER_VIVE}")
message(STATUS "# DRIVER_QWERTY: ${XRT_BUILD_DRIVER_QWERTY}")
message(STATUS "# DRIVER_WMR: ${XRT_BUILD_DRIVER_WMR}")
message(STATUS "# DRIVER_EUROC: ${XRT_BUILD_DRIVER_EUROC}")
message(STATUS "#####----- Config -----#####")
if(XRT_FEATURE_SERVICE AND NOT XRT_FEATURE_OPENXR)
message(FATAL_ERROR "XRT_FEATURE_SERVICE requires XRT_FEATURE_OPENXR to be enabled")
endif()

10
LICENSES/Unlicense.txt Normal file
View file

@ -0,0 +1,10 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>

View file

@ -68,6 +68,10 @@ best with the following vcpkg packages installed:
* pthreads eigen3 libusb hidapi zlib doxygen
If you have a recent [vcpkg](https://vcpkg.io) installed and use the appropriate
CMake toolchain file, the vcpkg manifest in the Monado repository will instruct
vcpkg to locally install the dependencies automatically.
Tested distributions that are fully compatible,
on Intel (Vulkan only) and AMD graphics (Vulkan and OpenGL):
@ -241,8 +245,11 @@ scripts/format-project.sh
You can optionally put something like `CLANG_FORMAT=clang-format-7` before that command
if your clang-format binary isn't named `clang-format`.
Note that you'll typically prefer to use something like `git clang-format`
**Note that you'll typically prefer** to use something like `git clang-format`
to just re-format your changes, in case version differences in tools result in overall format changes.
The CI "style" job currently runs on Debian Buster, so it has clang-format-7.
We will probably update that job to Bullseye or Ubuntu 20.10, which will allow
using clang-format-11 by default, soon.
[OpenHMD]: http://openhmd.net
[drm-lease]: https://haagch.frickel.club/#!drmlease%2Emd

View file

@ -1,29 +1,30 @@
// Copyright 2020, Collabora, Ltd.
// Copyright 2020-2021, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
buildscript {
ext {
kotlinVersion = '1.4.10'
latestAboutLibsRelease = "8.5.0"
kotlinVersion = '1.5.0'
// Skip 8.8.6 - see https://github.com/mikepenz/AboutLibraries/issues/648
latestAboutLibsRelease = '8.8.5'
androidxCoreVersion = "1.3.2"
androidxAnnotationVersion = "1.1.0"
androidxAnnotationVersion = '1.2.0'
androidxAppCompatVersion = "1.2.0"
androidxLifecycleVersion = "2.2.0"
androidxConstraintLayoutVersion = '2.0.4'
hiltVersion = "2.29.1-alpha"
hiltVersion = '2.35.1'
// Saw some breakage when updating to 1.2?
materialVersion = "1.1.0"
materialVersion = "1.3.0"
}
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.android.tools.build:gradle:4.2.1'
//noinspection DifferentKotlinGradleVersion
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${latestAboutLibsRelease}"
classpath 'com.quittle:svg-2-android-vector:0.0.5'
@ -59,6 +60,6 @@ ext {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View file

@ -36,7 +36,7 @@
#=============================================================================
# Copyright 2014 Alex Merry <alex.merry@kde.org>
# Copyright 2014 Martin Gräßlin <mgraesslin@kde.org>
# Copyright 2019 Ryan Pavlik <ryan.pavlik@collabora.com>
# Copyright 2019, 2021 Ryan Pavlik <ryan.pavlik@collabora.com>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -67,8 +67,12 @@ include(CMakePushCheckState)
# Use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
pkg_check_modules(PKG_EGL QUIET egl)
if(NOT ANDROID)
find_package(PkgConfig QUIET)
if(PKGCONFIG_FOUND)
pkg_check_modules(PKG_EGL QUIET egl)
endif()
endif()
set(EGL_DEFINITIONS ${PKG_EGL_CFLAGS_OTHER})

View file

@ -40,11 +40,11 @@
# ``HIDAPI_LIBRARIES``
#
# Original Author:
# 2009-2010, 2019 Ryan Pavlik <ryan.pavlik@collabora.com> <abiryan@ryand.net>
# 2009-2010, 2019, 2021 Ryan Pavlik <ryan.pavlik@collabora.com> <abiryan@ryand.net>
# http://academic.cleardefinition.com
#
# Copyright Iowa State University 2009-2010.
# Copyright Collabora, Ltd. 2019.
# Copyright Collabora, Ltd. 2019, 2021.
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
@ -72,17 +72,19 @@ if(NOT HIDAPI_FIND_COMPONENTS)
endif()
# Ask pkg-config for hints
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
set(_old_prefix_path "${CMAKE_PREFIX_PATH}")
# So pkg-config uses HIDAPI_ROOT_DIR too.
if(HIDAPI_ROOT_DIR)
list(APPEND CMAKE_PREFIX_PATH ${HIDAPI_ROOT_DIR})
if(NOT ANDROID)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
set(_old_prefix_path "${CMAKE_PREFIX_PATH}")
# So pkg-config uses HIDAPI_ROOT_DIR too.
if(HIDAPI_ROOT_DIR)
list(APPEND CMAKE_PREFIX_PATH ${HIDAPI_ROOT_DIR})
endif()
pkg_check_modules(PC_HIDAPI_LIBUSB QUIET hidapi-libusb)
pkg_check_modules(PC_HIDAPI_HIDRAW QUIET hidapi-hidraw)
# Restore
set(CMAKE_PREFIX_PATH "${_old_prefix_path}")
endif()
pkg_check_modules(PC_HIDAPI_LIBUSB QUIET hidapi-libusb)
pkg_check_modules(PC_HIDAPI_HIDRAW QUIET hidapi-hidraw)
# Restore
set(CMAKE_PREFIX_PATH "${_old_prefix_path}")
endif()
# Actually search

62
cmake/FindLeapV2.cmake Normal file
View file

@ -0,0 +1,62 @@
# Copyright 2019-2021, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
# Original Author:
# 2021 Moses Turner <moses@collabora.com>
#.rst:
# FindLeapV2
# ---------------
#
# Find the Ultraleap v2 drivers
#
# Targets
# ^^^^^^^
#
# If successful, the following import target is created.
#
# ``LeapV2::LeapV2``
#
# Cache variables
# ^^^^^^^^^^^^^^^
#
# The following cache variable may also be set to assist/control the operation of this module:
#
# ``LeapV2_ROOT_DIR``
# The root to search for Leap v2.
#
set(LeapV2_ROOT_DIR
"${LeapV2_ROOT_DIR}"
CACHE PATH "Root to search for LeapV2")
find_path(
LeapV2_INCLUDE_DIR
NAMES Leap.h LeapMath.h
PATHS ${LeapV2_ROOT_DIR}
PATH_SUFFIXES include)
find_library(
LeapV2_LIBRARY
NAMES Leap
PATHS ${LeapV2_ROOT_DIR}
PATH_SUFFIXES lib lib/x64)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LeapV2 REQUIRED_VARS LeapV2_INCLUDE_DIR
LeapV2_LIBRARY)
if(LeapV2_FOUND)
set(LeapV2_INCLUDE_DIRS "${LeapV2_INCLUDE_DIR}")
set(LeapV2_LIBRARIES "${LeapV2_LIBRARY}")
if(NOT TARGET LeapV2::LeapV2)
add_library(LeapV2::LeapV2 UNKNOWN IMPORTED)
endif()
set_target_properties(
LeapV2::LeapV2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LeapV2_INCLUDE_DIR}")
set_target_properties(LeapV2::LeapV2 PROPERTIES IMPORTED_LOCATION
"${LeapV2_LIBRARY}")
mark_as_advanced(LeapV2_INCLUDE_DIR LeapV2_LIBRARY)
endif()
mark_as_advanced(LeapV2_ROOT_DIR)

View file

@ -1,11 +1,11 @@
# Copyright 2019 Collabora, Ltd.
# Copyright 2019, 2021 Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
# Original Author:
# 2019 Ryan Pavlik <ryan.pavlik@collabora.com>
# 2019, 2021 Ryan Pavlik <ryan.pavlik@collabora.com>
#.rst:
# FindCheck
@ -36,17 +36,20 @@ set(LIBCHECK_ROOT_DIR
"${LIBCHECK_ROOT_DIR}"
CACHE PATH "Root to search for libcheck")
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
set(_old_prefix_path "${CMAKE_PREFIX_PATH}")
# So pkg-config uses LIBCHECK_ROOT_DIR too.
if(LIBCHECK_ROOT_DIR)
list(APPEND CMAKE_PREFIX_PATH ${LIBCHECK_ROOT_DIR})
if(NOT ANDROID)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
set(_old_prefix_path "${CMAKE_PREFIX_PATH}")
# So pkg-config uses LIBCHECK_ROOT_DIR too.
if(LIBCHECK_ROOT_DIR)
list(APPEND CMAKE_PREFIX_PATH ${LIBCHECK_ROOT_DIR})
endif()
pkg_check_modules(PC_LIBCHECK QUIET check)
# Restore
set(CMAKE_PREFIX_PATH "${_old_prefix_path}")
endif()
pkg_check_modules(PC_LIBCHECK QUIET check)
# Restore
set(CMAKE_PREFIX_PATH "${_old_prefix_path}")
endif()
find_path(
LIBCHECK_INCLUDE_DIR
NAMES check.h

View file

@ -14,11 +14,11 @@
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
# 2009-2010, 2021 Ryan Pavlik <ryanpavlik@gmail.com> <abiryan@ryand.net>
#
# Copyright Iowa State University 2009-2010.
# Copyright Collabora, Ltd 2021.
#
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
@ -47,9 +47,11 @@ if(WIN32)
endif()
else()
set(_lib_suffixes)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_LIBUSB1 libusb-1.0)
if(NOT ANDROID)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_LIBUSB1 QUIET libusb-1.0)
endif()
endif()
endif()

View file

@ -0,0 +1,78 @@
# Copyright 2021, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
# Original Author:
# 2021 Moses Turner <moses@collabora.com>
# 2021 Ryan Pavlik <ryan.pavlik@collabora.com>
#.rst:
# FindONNXRuntime
# ---------------
#
# Find the ONNX runtime
#
# Targets
# ^^^^^^^
#
# If successful, the following import target is created.
#
# ``ONNXRuntime::ONNXRuntime``
#
# Cache variables
# ^^^^^^^^^^^^^^^
#
# The following cache variable may also be set to assist/control the operation of this module:
#
# ``ONNXRuntime_ROOT_DIR``
# The root to search for ONNX runtime.
#
include(FeatureSummary)
set_package_properties(
ONNXRuntime PROPERTIES
URL "https://onnxruntime.ai/"
DESCRIPTION "Machine learning runtime")
set(ONNXRuntime_ROOT_DIR
"${ONNXRuntime_ROOT_DIR}"
CACHE PATH "Root to search for ONNXRuntime")
find_package(PkgConfig)
pkg_check_modules(PC_ONNXRuntime QUIET libonnxruntime)
find_library(
ONNXRuntime_LIBRARY
NAMES onnxruntime
PATHS ${ONNXRuntime_ROOT_DIR}
PATH_SUFFIXES lib
HINTS ${PC_ONNXRuntime_LIBRARY_DIRS})
find_path(
ONNXRuntime_INCLUDE_DIR core/session/onnxruntime_cxx_api.h
PATHS ${ONNXRuntime_ROOT_DIR}
PATH_SUFFIXES onnxruntime include/onnxruntime
HINTS ${PC_ONNXRuntime_INCLUDE_DIRS})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
ONNXRuntime REQUIRED_VARS ONNXRuntime_INCLUDE_DIR ONNXRuntime_LIBRARY)
if(ONNXRuntime_FOUND)
set(ONNXRuntime_INCLUDE_DIRS ${ONNXRuntime_INCLUDE_DIR})
set(ONNXRuntime_LIBRARIES "${ONNXRuntime_LIBRARY}")
if(NOT TARGET ONNXRuntime::ONNXRuntime)
add_library(ONNXRuntime::ONNXRuntime UNKNOWN IMPORTED)
endif()
set_target_properties(
ONNXRuntime::ONNXRuntime PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${ONNXRuntime_INCLUDE_DIRS}")
set_target_properties(
ONNXRuntime::ONNXRuntime
PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${ONNXRuntime_LIBRARY}")
mark_as_advanced(ONNXRuntime_INCLUDE_DIRS ONNXRuntime_LIBRARY)
endif()
mark_as_advanced(ONNXRuntime_ROOT_DIR)

View file

@ -1,11 +1,11 @@
# Copyright 2020 Collabora, Ltd.
# Copyright 2020-2021 Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
# Original Author:
# 2020 Ryan Pavlik <ryan.pavlik@collabora.com>
# 2020-2021 Ryan Pavlik <ryan.pavlik@collabora.com>
#[[.rst:
FindOpenGLES
@ -53,18 +53,22 @@ set(OpenGLES_ROOT_DIR
if(NOT OpenGLES_FIND_COMPONENTS)
set(OpenGLES_FIND_COMPONENTS V2)
endif()
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
set(_old_prefix_path "${CMAKE_PREFIX_PATH}")
# So pkg-config uses OpenGLES_ROOT_DIR too.
if(OpenGLES_ROOT_DIR)
list(APPEND CMAKE_PREFIX_PATH ${OpenGLES_ROOT_DIR})
if(NOT ANDROID)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
set(_old_prefix_path "${CMAKE_PREFIX_PATH}")
# So pkg-config uses OpenGLES_ROOT_DIR too.
if(OpenGLES_ROOT_DIR)
list(APPEND CMAKE_PREFIX_PATH ${OpenGLES_ROOT_DIR})
endif()
pkg_check_modules(PC_glesv1_cm QUIET glesv1_cm)
pkg_check_modules(PC_glesv2 QUIET glesv2)
# Restore
set(CMAKE_PREFIX_PATH "${_old_prefix_path}")
endif()
pkg_check_modules(PC_glesv1_cm QUIET glesv1_cm)
pkg_check_modules(PC_glesv2 QUIET glesv2)
# Restore
set(CMAKE_PREFIX_PATH "${_old_prefix_path}")
endif()
find_path(
OpenGLES_V1_INCLUDE_DIR
NAMES GLES/gl.h

View file

@ -1,11 +1,11 @@
# Copyright 2019 Collabora, Ltd.
# Copyright 2019, 2021 Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
# Original Author:
# 2019 Ryan Pavlik <ryan.pavlik@collabora.com>
# 2019, 2021 Ryan Pavlik <ryan.pavlik@collabora.com>
#.rst:
# FindOpenHMD
@ -34,16 +34,18 @@ set(OPENHMD_ROOT_DIR
"${OPENHMD_ROOT_DIR}"
CACHE PATH "Root to search for OpenHMD")
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
set(_old_prefix_path "${CMAKE_PREFIX_PATH}")
# So pkg-config uses OPENHMD_ROOT_DIR too.
if(OPENHMD_ROOT_DIR)
list(APPEND CMAKE_PREFIX_PATH ${OPENHMD_ROOT_DIR})
if(NOT ANDROID)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
set(_old_prefix_path "${CMAKE_PREFIX_PATH}")
# So pkg-config uses OPENHMD_ROOT_DIR too.
if(OPENHMD_ROOT_DIR)
list(APPEND CMAKE_PREFIX_PATH ${OPENHMD_ROOT_DIR})
endif()
pkg_check_modules(PC_OPENHMD QUIET openhmd)
# Restore
set(CMAKE_PREFIX_PATH "${_old_prefix_path}")
endif()
pkg_check_modules(PC_OPENHMD QUIET openhmd)
# Restore
set(CMAKE_PREFIX_PATH "${_old_prefix_path}")
endif()
find_path(

114
cmake/FindPercetto.cmake Normal file
View file

@ -0,0 +1,114 @@
# Copyright 2021 Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
# Original Author:
# 2021 Ryan Pavlik <ryan.pavlik@collabora.com>
#[[.rst:
FindPercetto
---------------
Find the Percetto C wrapper around the Perfetto tracing API.
Targets
^^^^^^^
If successful, the following imported targets are created.
* ``Percetto::percetto``
Cache variables
^^^^^^^^^^^^^^^
The following cache variable may also be set to assist/control the operation of this module:
``Percetto_ROOT_DIR``
The root to search for Percetto.
#]]
set(Percetto_ROOT_DIR
"${Percetto_ROOT_DIR}"
CACHE PATH "Root to search for Percetto")
include(FeatureSummary)
set_package_properties(
Percetto PROPERTIES
URL "https://github.com/olvaffe/percetto/"
DESCRIPTION "A C wrapper around the C++ Perfetto tracing SDK.")
# See if we can find something made by android prefab (gradle)
find_package(Percetto QUIET CONFIG NAMES percetto Percetto)
if(Percetto_FOUND)
if(TARGET Percetto::percetto)
# OK, good - unexpected, but good.
get_target_property(Percetto_LIBRARY Percetto::percetto
IMPORTED_LOCATION)
get_target_property(Percetto_INCLUDE_DIR Percetto::percetto
INTERFACE_INCLUDE_DIRECTORIES)
elseif(TARGET percetto::percetto)
# Let's make our own of the right name
add_library(Percetto::percetto STATIC IMPORTED)
get_target_property(Percetto_INCLUDE_DIR percetto::percetto
INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(Percetto_LIBRARY percetto::percetto
IMPORTED_LOCATION)
set_target_properties(
Percetto::percetto
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Percetto_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION ${Percetto_LIBRARY})
else()
message(FATAL_ERROR "assumptions failed")
endif()
find_package_handle_standard_args(
Percetto REQUIRED_VARS Percetto_LIBRARY Percetto_INCLUDE_DIR)
return()
endif()
if(NOT ANDROID)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
set(_old_prefix_path "${CMAKE_PREFIX_PATH}")
# So pkg-config uses Percetto_ROOT_DIR too.
if(Percetto_ROOT_DIR)
list(APPEND CMAKE_PREFIX_PATH ${Percetto_ROOT_DIR})
endif()
pkg_check_modules(PC_percetto QUIET percetto)
# Restore
set(CMAKE_PREFIX_PATH "${_old_prefix_path}")
endif()
endif()
find_path(
Percetto_INCLUDE_DIR
NAMES percetto.h
PATHS ${Percetto_ROOT_DIR}
HINTS ${PC_percetto_INCLUDE_DIRS}
PATH_SUFFIXES include)
find_library(
Percetto_LIBRARY
NAMES percetto
PATHS ${Percetto_ROOT_DIR}
HINTS ${PC_percetto_LIBRARY_DIRS}
PATH_SUFFIXES lib)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Percetto REQUIRED_VARS Percetto_INCLUDE_DIR
Percetto_LIBRARY)
if(Percetto_FOUND)
if(NOT TARGET Percetto::percetto)
add_library(Percetto::percetto STATIC IMPORTED)
set_target_properties(
Percetto::percetto
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Percetto_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION ${Percetto_LIBRARY})
endif()
mark_as_advanced(Percetto_LIBRARY Percetto_INCLUDE_DIR)
endif()
mark_as_advanced(Percetto_ROOT_DIR)

View file

@ -15,7 +15,7 @@
#
#=============================================================================
# Copyright (c) 2015 Jari Vetoniemi
# Copyright (c) 2020 Collabora, Ltd.
# Copyright (c) 2020-2021 Collabora, Ltd.
#
# Distributed under the OSI-approved BSD License (the "License");
#
@ -31,8 +31,13 @@ set_package_properties(
URL "http://freedesktop.org/wiki/Software/systemd/"
DESCRIPTION "System and Service Manager")
find_package(PkgConfig)
pkg_check_modules(PC_SYSTEMD QUIET libsystemd)
if(NOT ANDROID)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_SYSTEMD QUIET libsystemd)
endif()
endif()
find_library(
SYSTEMD_LIBRARY
NAMES systemd

View file

@ -13,8 +13,13 @@
# Requires these CMake modules:
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
#
# Original Author:
# Copyright 2014 Kevin M. Godby <kevin@godby.org>
# Original Authors:
# 2014 Kevin M. Godby <kevin@godby.org>
# 2021 Ryan Pavlik <ryan.pavlik@collabora.com>
#
# Copyright 2014, Kevin M. Godby <kevin@godby.org>
# Copyright 2021, Collabora, Ltd.
#
# SPDX-License-Identifier: BSL-1.0
#
# Distributed under the Boost Software License, Version 1.0.
@ -27,9 +32,11 @@ set(UDEV_ROOT_DIR
PATH
"Directory to search for udev")
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_LIBUDEV libudev)
if(NOT ANDROID)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_LIBUDEV QUIET libudev)
endif()
endif()
find_library(UDEV_LIBRARY

View file

@ -3,7 +3,7 @@
# These functions force a re-configure on each git commit so that you can
# trust the values of the variables in your build system.
#
# get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...])
# get_git_head_revision(<refspecvar> <hashvar> [ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR])
#
# Returns the refspec and sha hash of the current head revision
#
@ -68,7 +68,7 @@ function(_git_find_closest_git_dir _start_dir _git_dir_var)
while(NOT EXISTS "${git_dir}")
# .git dir not found, search parent directories
set(git_previous_parent "${cur_dir}")
get_filename_component(cur_dir ${cur_dir} DIRECTORY)
get_filename_component(cur_dir "${cur_dir}" DIRECTORY)
if(cur_dir STREQUAL git_previous_parent)
# We have reached the root directory, we are not in git
set(${_git_dir_var}
@ -86,10 +86,15 @@ endfunction()
function(get_git_head_revision _refspecvar _hashvar)
_git_find_closest_git_dir("${CMAKE_CURRENT_SOURCE_DIR}" GIT_DIR)
if("${ARGN}" STREQUAL "ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR")
set(ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR TRUE)
else()
set(ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR FALSE)
endif()
if(NOT "${GIT_DIR}" STREQUAL "")
file(RELATIVE_PATH _relative_to_source_dir "${CMAKE_SOURCE_DIR}"
"${GIT_DIR}")
if("${_relative_to_source_dir}" MATCHES "[.][.]")
if("${_relative_to_source_dir}" MATCHES "[.][.]" AND NOT ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR)
# We've gone above the CMake root dir.
set(GIT_DIR "")
endif()

View file

@ -0,0 +1,61 @@
# The MIT License (MIT)
#
# Copyright (c)
# 2013 Matthew Arsenault
# 2015-2016 RWTH Aachen University, Federal Republic of Germany
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# SPDX-License-Identifier: MIT
option(SANITIZE_ADDRESS "Enable AddressSanitizer for sanitized targets." Off)
set(FLAG_CANDIDATES
# Clang 3.2+ use this version. The no-omit-frame-pointer option is optional.
"-g -fsanitize=address -fno-omit-frame-pointer"
"-g -fsanitize=address"
# Older deprecated flag for ASan
"-g -faddress-sanitizer"
)
if (SANITIZE_ADDRESS AND (SANITIZE_THREAD OR SANITIZE_MEMORY))
message(FATAL_ERROR "AddressSanitizer is not compatible with "
"ThreadSanitizer or MemorySanitizer.")
endif ()
include(sanitize-helpers)
if (SANITIZE_ADDRESS)
sanitizer_check_compiler_flags("${FLAG_CANDIDATES}" "AddressSanitizer"
"ASan")
find_program(ASan_WRAPPER "asan-wrapper" PATHS ${CMAKE_MODULE_PATH})
mark_as_advanced(ASan_WRAPPER)
endif ()
function (add_sanitize_address TARGET)
if (NOT SANITIZE_ADDRESS)
return()
endif ()
sanitizer_add_flags(${TARGET} "AddressSanitizer" "ASan")
endfunction ()

View file

@ -0,0 +1,59 @@
# The MIT License (MIT)
#
# Copyright (c)
# 2013 Matthew Arsenault
# 2015-2016 RWTH Aachen University, Federal Republic of Germany
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# SPDX-License-Identifier: MIT
option(SANITIZE_MEMORY "Enable MemorySanitizer for sanitized targets." Off)
set(FLAG_CANDIDATES
"-g -fsanitize=memory"
)
include(sanitize-helpers)
if (SANITIZE_MEMORY)
if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
message(WARNING "MemorySanitizer disabled for target ${TARGET} because "
"MemorySanitizer is supported for Linux systems only.")
set(SANITIZE_MEMORY Off CACHE BOOL
"Enable MemorySanitizer for sanitized targets." FORCE)
elseif (NOT ${CMAKE_SIZEOF_VOID_P} EQUAL 8)
message(WARNING "MemorySanitizer disabled for target ${TARGET} because "
"MemorySanitizer is supported for 64bit systems only.")
set(SANITIZE_MEMORY Off CACHE BOOL
"Enable MemorySanitizer for sanitized targets." FORCE)
else ()
sanitizer_check_compiler_flags("${FLAG_CANDIDATES}" "MemorySanitizer"
"MSan")
endif ()
endif ()
function (add_sanitize_memory TARGET)
if (NOT SANITIZE_MEMORY)
return()
endif ()
sanitizer_add_flags(${TARGET} "MemorySanitizer" "MSan")
endfunction ()

View file

@ -0,0 +1,96 @@
# The MIT License (MIT)
#
# Copyright (c)
# 2013 Matthew Arsenault
# 2015-2016 RWTH Aachen University, Federal Republic of Germany
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# SPDX-License-Identifier: MIT
# If any of the used compiler is a GNU compiler, add a second option to static
# link against the sanitizers.
option(SANITIZE_LINK_STATIC "Try to link static against sanitizers." Off)
set(FIND_QUIETLY_FLAG "")
if (DEFINED Sanitizers_FIND_QUIETLY)
set(FIND_QUIETLY_FLAG "QUIET")
endif ()
find_package(ASan ${FIND_QUIETLY_FLAG})
find_package(TSan ${FIND_QUIETLY_FLAG})
find_package(MSan ${FIND_QUIETLY_FLAG})
find_package(UBSan ${FIND_QUIETLY_FLAG})
function(sanitizer_add_blacklist_file FILE)
if(NOT IS_ABSOLUTE ${FILE})
set(FILE "${CMAKE_CURRENT_SOURCE_DIR}/${FILE}")
endif()
get_filename_component(FILE "${FILE}" REALPATH)
sanitizer_check_compiler_flags("-fsanitize-blacklist=${FILE}"
"SanitizerBlacklist" "SanBlist")
endfunction()
function(add_sanitizers ...)
# If no sanitizer is enabled, return immediately.
if (NOT (SANITIZE_ADDRESS OR SANITIZE_MEMORY OR SANITIZE_THREAD OR
SANITIZE_UNDEFINED))
return()
endif ()
foreach (TARGET ${ARGV})
# Check if this target will be compiled by exactly one compiler. Other-
# wise sanitizers can't be used and a warning should be printed once.
get_target_property(TARGET_TYPE ${TARGET} TYPE)
if (TARGET_TYPE STREQUAL "INTERFACE_LIBRARY")
message(WARNING "Can't use any sanitizers for target ${TARGET}, "
"because it is an interface library and cannot be "
"compiled directly.")
return()
endif ()
sanitizer_target_compilers(${TARGET} TARGET_COMPILER)
list(LENGTH TARGET_COMPILER NUM_COMPILERS)
if (NUM_COMPILERS GREATER 1)
message(WARNING "Can't use any sanitizers for target ${TARGET}, "
"because it will be compiled by incompatible compilers. "
"Target will be compiled without sanitizers.")
return()
# If the target is compiled by no or no known compiler, give a warning.
elseif (NUM_COMPILERS EQUAL 0)
message(WARNING "Sanitizers for target ${TARGET} may not be"
" usable, because it uses no or an unknown compiler. "
"This is a false warning for targets using only "
"object lib(s) as input.")
endif ()
# Add sanitizers for target.
add_sanitize_address(${TARGET})
add_sanitize_thread(${TARGET})
add_sanitize_memory(${TARGET})
add_sanitize_undefined(${TARGET})
endforeach ()
endfunction(add_sanitizers)

View file

@ -0,0 +1,67 @@
# The MIT License (MIT)
#
# Copyright (c)
# 2013 Matthew Arsenault
# 2015-2016 RWTH Aachen University, Federal Republic of Germany
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# SPDX-License-Identifier: MIT
option(SANITIZE_THREAD "Enable ThreadSanitizer for sanitized targets." Off)
set(FLAG_CANDIDATES
"-g -fsanitize=thread"
)
# ThreadSanitizer is not compatible with MemorySanitizer.
if (SANITIZE_THREAD AND SANITIZE_MEMORY)
message(FATAL_ERROR "ThreadSanitizer is not compatible with "
"MemorySanitizer.")
endif ()
include(sanitize-helpers)
if (SANITIZE_THREAD)
if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND
NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
message(WARNING "ThreadSanitizer disabled for target ${TARGET} because "
"ThreadSanitizer is supported for Linux systems and macOS only.")
set(SANITIZE_THREAD Off CACHE BOOL
"Enable ThreadSanitizer for sanitized targets." FORCE)
elseif (NOT ${CMAKE_SIZEOF_VOID_P} EQUAL 8)
message(WARNING "ThreadSanitizer disabled for target ${TARGET} because "
"ThreadSanitizer is supported for 64bit systems only.")
set(SANITIZE_THREAD Off CACHE BOOL
"Enable ThreadSanitizer for sanitized targets." FORCE)
else ()
sanitizer_check_compiler_flags("${FLAG_CANDIDATES}" "ThreadSanitizer"
"TSan")
endif ()
endif ()
function (add_sanitize_thread TARGET)
if (NOT SANITIZE_THREAD)
return()
endif ()
sanitizer_add_flags(${TARGET} "ThreadSanitizer" "TSan")
endfunction ()

View file

@ -0,0 +1,48 @@
# The MIT License (MIT)
#
# Copyright (c)
# 2013 Matthew Arsenault
# 2015-2016 RWTH Aachen University, Federal Republic of Germany
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# SPDX-License-Identifier: MIT
option(SANITIZE_UNDEFINED
"Enable UndefinedBehaviorSanitizer for sanitized targets." Off)
set(FLAG_CANDIDATES
"-g -fsanitize=undefined"
)
include(sanitize-helpers)
if (SANITIZE_UNDEFINED)
sanitizer_check_compiler_flags("${FLAG_CANDIDATES}"
"UndefinedBehaviorSanitizer" "UBSan")
endif ()
function (add_sanitize_undefined TARGET)
if (NOT SANITIZE_UNDEFINED)
return()
endif ()
sanitizer_add_flags(${TARGET} "UndefinedBehaviorSanitizer" "UBSan")
endfunction ()

57
cmake/sanitizers/asan-wrapper Executable file
View file

@ -0,0 +1,57 @@
#!/bin/sh
# The MIT License (MIT)
#
# Copyright (c)
# 2013 Matthew Arsenault
# 2015-2016 RWTH Aachen University, Federal Republic of Germany
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# SPDX-License-Identifier: MIT
# This script is a wrapper for AddressSanitizer. In some special cases you need
# to preload AddressSanitizer to avoid error messages - e.g. if you're
# preloading another library to your application. At the moment this script will
# only do something, if we're running on a Linux platform. OSX might not be
# affected.
# Exit immediately, if platform is not Linux.
if [ "$(uname)" != "Linux" ]
then
exec $@
fi
# Get the used libasan of the application ($1). If a libasan was found, it will
# be prepended to LD_PRELOAD.
libasan=$(ldd $1 | grep libasan | sed "s/^[[:space:]]//" | cut -d' ' -f1)
if [ -n "$libasan" ]
then
if [ -n "$LD_PRELOAD" ]
then
export LD_PRELOAD="$libasan:$LD_PRELOAD"
else
export LD_PRELOAD="$libasan"
fi
fi
# Execute the application.
exec $@

View file

@ -0,0 +1,179 @@
# The MIT License (MIT)
#
# Copyright (c)
# 2013 Matthew Arsenault
# 2015-2016 RWTH Aachen University, Federal Republic of Germany
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# SPDX-License-Identifier: MIT
# Helper function to get the language of a source file.
function (sanitizer_lang_of_source FILE RETURN_VAR)
get_filename_component(LONGEST_EXT "${FILE}" EXT)
# If extension is empty return. This can happen for extensionless headers
if("${LONGEST_EXT}" STREQUAL "")
set(${RETURN_VAR} "" PARENT_SCOPE)
return()
endif()
# Get shortest extension as some files can have dot in their names
string(REGEX REPLACE "^.*(\\.[^.]+)$" "\\1" FILE_EXT ${LONGEST_EXT})
string(TOLOWER "${FILE_EXT}" FILE_EXT)
string(SUBSTRING "${FILE_EXT}" 1 -1 FILE_EXT)
get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
foreach (LANG ${ENABLED_LANGUAGES})
list(FIND CMAKE_${LANG}_SOURCE_FILE_EXTENSIONS "${FILE_EXT}" TEMP)
if (NOT ${TEMP} EQUAL -1)
set(${RETURN_VAR} "${LANG}" PARENT_SCOPE)
return()
endif ()
endforeach()
set(${RETURN_VAR} "" PARENT_SCOPE)
endfunction ()
# Helper function to get compilers used by a target.
function (sanitizer_target_compilers TARGET RETURN_VAR)
# Check if all sources for target use the same compiler. If a target uses
# e.g. C and Fortran mixed and uses different compilers (e.g. clang and
# gfortran) this can trigger huge problems, because different compilers may
# use different implementations for sanitizers.
set(BUFFER "")
get_target_property(TSOURCES ${TARGET} SOURCES)
foreach (FILE ${TSOURCES})
# If expression was found, FILE is a generator-expression for an object
# library. Object libraries will be ignored.
string(REGEX MATCH "TARGET_OBJECTS:([^ >]+)" _file ${FILE})
if ("${_file}" STREQUAL "")
sanitizer_lang_of_source(${FILE} LANG)
if (LANG)
list(APPEND BUFFER ${CMAKE_${LANG}_COMPILER_ID})
endif ()
endif ()
endforeach ()
list(REMOVE_DUPLICATES BUFFER)
set(${RETURN_VAR} "${BUFFER}" PARENT_SCOPE)
endfunction ()
# Helper function to check compiler flags for language compiler.
function (sanitizer_check_compiler_flag FLAG LANG VARIABLE)
if (${LANG} STREQUAL "C")
include(CheckCCompilerFlag)
check_c_compiler_flag("${FLAG}" ${VARIABLE})
elseif (${LANG} STREQUAL "CXX")
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("${FLAG}" ${VARIABLE})
elseif (${LANG} STREQUAL "Fortran")
# CheckFortranCompilerFlag was introduced in CMake 3.x. To be compatible
# with older Cmake versions, we will check if this module is present
# before we use it. Otherwise we will define Fortran coverage support as
# not available.
include(CheckFortranCompilerFlag OPTIONAL RESULT_VARIABLE INCLUDED)
if (INCLUDED)
check_fortran_compiler_flag("${FLAG}" ${VARIABLE})
elseif (NOT CMAKE_REQUIRED_QUIET)
message(STATUS "Performing Test ${VARIABLE}")
message(STATUS "Performing Test ${VARIABLE}"
" - Failed (Check not supported)")
endif ()
endif()
endfunction ()
# Helper function to test compiler flags.
function (sanitizer_check_compiler_flags FLAG_CANDIDATES NAME PREFIX)
set(CMAKE_REQUIRED_QUIET ${${PREFIX}_FIND_QUIETLY})
get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
foreach (LANG ${ENABLED_LANGUAGES})
# Sanitizer flags are not dependend on language, but the used compiler.
# So instead of searching flags foreach language, search flags foreach
# compiler used.
set(COMPILER ${CMAKE_${LANG}_COMPILER_ID})
if (NOT DEFINED ${PREFIX}_${COMPILER}_FLAGS)
foreach (FLAG ${FLAG_CANDIDATES})
if(NOT CMAKE_REQUIRED_QUIET)
message(STATUS "Try ${COMPILER} ${NAME} flag = [${FLAG}]")
endif()
set(CMAKE_REQUIRED_FLAGS "${FLAG}")
unset(${PREFIX}_FLAG_DETECTED CACHE)
sanitizer_check_compiler_flag("${FLAG}" ${LANG}
${PREFIX}_FLAG_DETECTED)
if (${PREFIX}_FLAG_DETECTED)
# If compiler is a GNU compiler, search for static flag, if
# SANITIZE_LINK_STATIC is enabled.
if (SANITIZE_LINK_STATIC AND (${COMPILER} STREQUAL "GNU"))
string(TOLOWER ${PREFIX} PREFIX_lower)
sanitizer_check_compiler_flag(
"-static-lib${PREFIX_lower}" ${LANG}
${PREFIX}_STATIC_FLAG_DETECTED)
if (${PREFIX}_STATIC_FLAG_DETECTED)
set(FLAG "-static-lib${PREFIX_lower} ${FLAG}")
endif ()
endif ()
set(${PREFIX}_${COMPILER}_FLAGS "${FLAG}" CACHE STRING
"${NAME} flags for ${COMPILER} compiler.")
mark_as_advanced(${PREFIX}_${COMPILER}_FLAGS)
break()
endif ()
endforeach ()
if (NOT ${PREFIX}_FLAG_DETECTED)
set(${PREFIX}_${COMPILER}_FLAGS "" CACHE STRING
"${NAME} flags for ${COMPILER} compiler.")
mark_as_advanced(${PREFIX}_${COMPILER}_FLAGS)
message(WARNING "${NAME} is not available for ${COMPILER} "
"compiler. Targets using this compiler will be "
"compiled without ${NAME}.")
endif ()
endif ()
endforeach ()
endfunction ()
# Helper to assign sanitizer flags for TARGET.
function (sanitizer_add_flags TARGET NAME PREFIX)
# Get list of compilers used by target and check, if sanitizer is available
# for this target. Other compiler checks like check for conflicting
# compilers will be done in add_sanitizers function.
sanitizer_target_compilers(${TARGET} TARGET_COMPILER)
list(LENGTH TARGET_COMPILER NUM_COMPILERS)
if ("${${PREFIX}_${TARGET_COMPILER}_FLAGS}" STREQUAL "")
return()
endif()
# Set compile- and link-flags for target.
set_property(TARGET ${TARGET} APPEND_STRING
PROPERTY COMPILE_FLAGS " ${${PREFIX}_${TARGET_COMPILER}_FLAGS}")
set_property(TARGET ${TARGET} APPEND_STRING
PROPERTY COMPILE_FLAGS " ${SanBlist_${TARGET_COMPILER}_FLAGS}")
set_property(TARGET ${TARGET} APPEND_STRING
PROPERTY LINK_FLAGS " ${${PREFIX}_${TARGET_COMPILER}_FLAGS}")
endfunction ()

View file

@ -4,7 +4,7 @@ directly within the "upstream" source tree.
There is useful stuff, more directed at package maintenance for distro
submission, in the Debian copy of this file:
<https://salsa.debian.org/monado-team/monado/-/blob/debian/master/debian/README.source>
<https://salsa.debian.org/monado-team/monado/-/blob/debian/sid/debian/README.source>
To build a package for local use:

15
debian/changelog vendored
View file

@ -4,11 +4,20 @@ monado (21.0.0~dfsg1-2~bpo10+1) buster-backports; urgency=medium
-- Ryan Pavlik <ryan@ryanpavlik.com> Tue, 23 Feb 2021 13:40:07 -0600
monado (21.0.0~dfsg1-2) UNRELEASED; urgency=medium
monado (21.0.0~dfsg1-2) unstable; urgency=medium
* d/control: Add Build-Depends on libbsd-dev for pidfile support when building service.
* d/control
- Add Build-Depends on libbsd-dev for pidfile support when
building service.
- Bump Standards-Version to 4.6.0, no changes required.
- Remove Build-Depends that we don't actually use.
- Exclude some dependencies on less-common arches to fix builds.
* d/copyright: Update
* Backport patch for upstream to fix FTBFS, closes: #997239
* Clean up/annotate patches
* Switch to pandoc from markdown for formatting changelog.
-- Ryan Pavlik <ryan@ryanpavlik.com> Thu, 15 Apr 2021 16:51:09 -0500
-- Ryan Pavlik <ryan@ryanpavlik.com> Tue, 26 Oct 2021 16:59:16 -0500
monado (21.0.0~dfsg1-1) unstable; urgency=medium

10
debian/control vendored
View file

@ -5,10 +5,8 @@ Section: libs
Priority: optional
Build-Depends: debhelper-compat (= 12),
cmake,
doxygen,
glslang-tools,
graphviz,
libavcodec-dev,
libavcodec-dev [!hppa !sh4],
libbsd-dev [linux-any],
libcjson-dev,
libdbus-1-dev [linux-any],
@ -19,7 +17,7 @@ Build-Depends: debhelper-compat (= 12),
libgstreamer1.0-dev,
libgstreamer-plugins-base1.0-dev,
libhidapi-dev [!hurd-i386],
libopencv-dev,
libopencv-dev [!alpha !ia64 !sparc64 !x32],
libsystemd-dev [linux-any],
libsdl2-dev,
libudev-dev,
@ -33,9 +31,9 @@ Build-Depends: debhelper-compat (= 12),
libxcb-randr0-dev,
libxrandr-dev,
libxxf86vm-dev,
markdown <!nodoc>,
pandoc <!nodoc>,
pkg-config
Standards-Version: 4.5.0
Standards-Version: 4.6.0
Vcs-Browser: https://gitlab.freedesktop.org/monado/monado/-/tree/debian/buster-backports
Vcs-Git: https://gitlab.freedesktop.org/monado/monado.git -b debian/buster-backports
Homepage: https://monado.freedesktop.org/

2
debian/copyright vendored
View file

@ -5,7 +5,7 @@ Copyright: 2018-2021, Collabora, Ltd.
License: BSL-1.0
Files: *
Copyright: 2018-2020, Collabora, Ltd.
Copyright: 2018-2021, Collabora, Ltd.
License: BSL-1.0
Files: cmake/GetGitRevisionDescription.cmake.in

View file

@ -3,4 +3,3 @@ ignore:
pattern:
- .reuse/*
- .gitlab-ci

2
debian/rules vendored
View file

@ -46,7 +46,7 @@ override_dh_install:
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
mkdir -p debian/tmp/usr/share/doc/monado
cp doc/CHANGELOG.md debian/tmp/usr/share/doc/monado/changelog
markdown doc/CHANGELOG.md > debian/tmp/usr/share/doc/monado/changelog.html
pandoc -f markdown -t html doc/CHANGELOG.md > debian/tmp/usr/share/doc/monado/changelog.html
endif
ifneq (,$(findstring linux,$(DEB_HOST_ARCH_OS)))
sed -i "s/%N/monado/" debian/tmp/usr/lib/systemd/user/monado.service

View file

@ -1,4 +1,4 @@
# Changelog for Monado
# Changelog for Monado {#CHANGELOG}
```txt
SPDX-License-Identifier: CC0-1.0

View file

@ -29,6 +29,14 @@ if(BUILD_DOC)
# request to configure the file
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
# copy the schema
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/example_configs/config_v0.schema.json
${CMAKE_CURRENT_BINARY_DIR}/html/config_v0.schema.json
@ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/example_configs/config_v0.schema.json.license
${CMAKE_CURRENT_BINARY_DIR}/html/config_v0.schema.json.license
@ONLY)
# note the option ALL which allows to build the docs together with the application
add_custom_target(doc_doxygen ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}

View file

@ -1,4 +1,4 @@
# Copyright 2018-2020, Collabora, Ltd. and the Monado contributors
# Copyright 2018-2021, Collabora, Ltd. and the Monado contributors
# SPDX-License-Identifier: BSL-1.0
QUIET = YES
@ -17,6 +17,8 @@ RECURSIVE = YES
EXCLUDE = @SRCDIR@/src/external \
@SRCDIR@/doc/changes \
@BUILDDIR@
EXCLUDE_PATTERNS = */build/*
STRIP_FROM_PATH = @SRCDIR@/src/xrt \
@SRCDIR@/src/xrt/include \
@SRCDIR@/doc
@ -63,6 +65,7 @@ ALWAYS_DETAILED_SEC = YES
WARN_IF_UNDOCUMENTED = @DOXYGEN_WARN_UNDOCUMENTED@
EXTRACT_ALL = @DOXYGEN_EXTRACT_ALL@
HIDE_UNDOC_RELATIONS = NO
EXTRACT_STATIC = @DOXYGEN_EXTRACT_ALL@
MACRO_EXPANSION = YES

View file

@ -0,0 +1,5 @@
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: 2021 Collabora, Ltd.
# Changelog fragments will never start with a header.
MD041: false

View file

@ -0,0 +1 @@
m/3dof: Add assert to catch time traveling drivers.

View file

@ -0,0 +1 @@
u/time: Add helper comparison functions.

View file

@ -0,0 +1 @@
vulkan: Add fence import function.

View file

@ -0,0 +1,3 @@
u/timing: A rather large refactor that turns makes the rendering timing helper
be more like the frame timing helper. This also makes the rendering timing
adjust the frame timing of the app so that latency is reduced.

View file

@ -0,0 +1 @@
math: Fixes for M_PI on Windows.

View file

@ -0,0 +1 @@
Move C++-only functionality into the newly-conventional namespaces.

View file

@ -0,0 +1,4 @@
---
- mr.840
---
u/trace_marker: Switch from homegrown tracing code to using Percetto/Perfetto.

View file

@ -0,0 +1,2 @@
t/fm: Add simple FrameMat that wraps a cv::Mat, this allows us to easily pass
cv::Mat's around without the C code needing to know about OpenCV.

View file

@ -0,0 +1,4 @@
util: added `u_device_2d_extents` and `u_setup_2d_extents_split_side_by_side` -
this is hopefully to eliminate confusion: the FOV you had to give to
`u_device_split_side_by_side` was just a dummy value, but some people thought
it was the actual headset's FOV.

View file

@ -0,0 +1 @@
math: Add `math_map_ranges` function, does the same thing as Arduino's `map`.

View file

@ -0,0 +1 @@
vulkan: Add more functions to vk_bundle struct.

View file

@ -0,0 +1 @@
vulkan: Make it possible to create a compute only queue.

View file

@ -0,0 +1 @@
vulkan: Refactor and tidy extension handling.

View file

@ -0,0 +1 @@
vulkan: Add support for VK_EXT_robustness2

View file

@ -0,0 +1 @@
vulkan: Add code to handle optional device features.

View file

@ -0,0 +1,2 @@
t/calibration: Add support for RGB image streams, also add a special sink
converter helper to handle this case.

View file

@ -0,0 +1 @@
t/calibration: Make it possible to select number distortion parameters.

View file

@ -0,0 +1 @@
t/calibration: Add support for findChessboardCornersSB in calibration code.

View file

@ -0,0 +1,2 @@
New WinMR driver, the initial commit only adds simple 3DoF support and not
distortion support.

View file

@ -0,0 +1,2 @@
New compute based rendering backend in the compositor, currently only supports
a single projection layer so it's not enabled by default. But comes with ATW.

View file

@ -0,0 +1 @@
comp: Fix layer submission on nvidia tegra.

View file

@ -0,0 +1 @@
main: Integrate new frame timing code.

View file

@ -0,0 +1,2 @@
client: Handle EGL_NO_CONTEXT_KHR gracefully if the EGLDisplay supports
EGL_KHR_no_config_context.

View file

@ -0,0 +1,8 @@
---
- mr.754
- mr.759
---
multi: Introduce a new multi client compositor layer, this allows rendering code
to be moved from the IPC layer into the compositor, separating concerns. The
main compositor always uses the multi client compositor, as it gives us a async
render loop for free.

View file

@ -0,0 +1,6 @@
---
- issue.120
- mr.787
---
main: Make it possible to create the swapchain later when actually needed,
and have the swapchain be in a non-ready state that stops drawing.

View file

@ -0,0 +1,2 @@
client: Use the EGL compositor's display in swapchain, previously it tried to
use the current one, which when running on a new thread would explode.

View file

@ -0,0 +1,3 @@
main: Do not list VK_FORMAT_A2B10G10R10_UNORM_PACK32 as a supported format, it's
not enough to show linear colours without banding but isn't used that often so
do not list it.

View file

@ -0,0 +1 @@
render: Prepare for submitting work on the compute queue.

View file

@ -0,0 +1 @@
main: Prepare for submitting work on the compute queue.

View file

@ -0,0 +1 @@
main: Also resize on VK_SUBOPTIMAL_KHR.

View file

@ -0,0 +1,2 @@
multi: Make sure there are at least some predicted data, to avoid asserts in
non-service mode.

View file

@ -0,0 +1 @@
main: Add new compute rendering backend.

View file

@ -0,0 +1 @@
render: Add ATW support in the compute pipeline.

View file

@ -0,0 +1 @@
vive: Factor out json config parser and reuse it in survive driver.

View file

@ -0,0 +1 @@
vive: Add rotation pose prediction to HMD and Controllers

View file

@ -0,0 +1 @@
vf: Show the time on the video test source video server.

View file

@ -0,0 +1,2 @@
psvr: Ensure that timestamps are always after each other, stopping any
time-traveling sample packets.

View file

@ -0,0 +1 @@
vive: Setup the variable tracking for imu fusion.

View file

@ -0,0 +1 @@
multi: Enable specifying arbitrary xrt_input_name for querying tracker poses.

View file

@ -0,0 +1 @@
ohmd: Support OpenHMD controllers and specifically the Oculus Touch controller.

View file

@ -0,0 +1,4 @@
---
- mr.803
---
wmr: Initial commit of driver, 3DoF only.

View file

@ -0,0 +1,5 @@
---
- mr.831
- mr.837
---
depthai: Add a new frameserver driver that uses supports the DepthAI cameras.

View file

@ -0,0 +1,5 @@
north_star:
- Upstreams Moses Turner's "VIPD" distortion.
- Fixes the FOV calc on the v1/3D distortion.
- General improvement of code organization.
- Improved JSON parsing.

View file

@ -0,0 +1 @@
v4l2: Add tracing support.

View file

@ -0,0 +1 @@
depthai: Add tracing support.

View file

@ -0,0 +1 @@
vf: Some tidy, frame fixes and tracing support.

View file

@ -0,0 +1,4 @@
ipc: Use libbsd pidfile to detect running Monado instances.
Enables automatically deleting stale socket files.
The socket file is now placed in $XDG_RUNTIME_DIR/monado_comp_ipc by default
or falls back to /tmp/monado_comp_ipc again if $XDG_RUNTIME_DIR is not set.

View file

@ -0,0 +1 @@
Factor out the IPC server mainloop into a per-platform structure.

View file

@ -0,0 +1 @@
all: Transfer HMD blend mode, don't drop it on the floor.

View file

@ -0,0 +1 @@
Support systemd socket activation with meson too.

View file

@ -0,0 +1,8 @@
---
- mr.754
- mr.768
- mr.800
- mr.846
---
Now that there is a interface that allows the compositor to support
multi-client rendering use that instead of doing our own rendering.

View file

@ -0,0 +1,2 @@
Ensure that functions that require the compositor can't be called if a session
has not been created yet.

View file

@ -0,0 +1,9 @@
---
- mr.703
- mr.783
- mr.808
- mr.820
- mr.817
- mr.918
---
More improvements to the Android port.

View file

@ -0,0 +1 @@
imgui: Add ImPlot demo window.

View file

@ -0,0 +1 @@
Implement tracking overrides via wrapper devices and add a tracking override configuration gui.

View file

@ -0,0 +1,3 @@
util: Add trace marker support code, this code uses the Linux trace_marker
kernel support to enable Monado to trace both function calls and other async
events.

View file

@ -0,0 +1,2 @@
util: Add frame timing helper code designed to use Vulkan display timing
extensions to get proper frame timing in the compositor.

View file

@ -0,0 +1 @@
external/glad: Add EGL extension EGL_KHR_no_config_context.

View file

@ -0,0 +1,3 @@
a/gst: Add a small and fairly dumb framework for integrating gstreamer pipelines
into Monado pipelines. Enough to be able to push frames into it and use various
encoder elements.

View file

@ -0,0 +1,4 @@
---
- mr.743
---
More work on the Windows port: fix timing, waiting, sleeping, handling the message queue.

View file

@ -0,0 +1,4 @@
---
- issue.82
---
Add JSON Schema for config files.

Some files were not shown because too many files have changed in this diff Show more