Older linux kernels like 4.15 don't have V4L2_CID_DIGITAL_GAIN or
V4L2_CTRL_FLAG_MODIFY_LAYOUT, add conditional guards to build
successfully on systems with such kernels.
When building on linux and OPENGL_GLX OFF compilation fails with the
following error:
-----------------------------------------------------------------------
../../state_trackers/oxr/libst_oxr.a(oxr_session_gfx_gl.c.o): In function `oxr_session_populate_gl_xlib':
oxr_session_gfx_gl.c:(.text+0x5c): undefined reference to `xrt_gfx_provider_create_gl_xlib'
collect2: error: ld returned 1 exit status
src/xrt/targets/openxr/CMakeFiles/openxr_monado.dir/build.make:126: recipe for target 'src/xrt/targets/openxr/libopenxr_monado.so' failed
make[2]: *** [src/xrt/targets/openxr/libopenxr_monado.so] Error 1
CMakeFiles/Makefile2:2490: recipe for target 'src/xrt/targets/openxr/CMakeFiles/openxr_monado.dir/all' failed
make[1]: *** [src/xrt/targets/openxr/CMakeFiles/openxr_monado.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2
-----------------------------------------------------------------------
Apparently the gl_xlib backend really depends on GLX specifically, so
fix the issue by reflecting that in the conditionally compiled blocks.
This matches the OpenXR usage: the array is the plural of the element type,
and the count is the singular element type plus "count" (usually CountOutput
because of the two-call idiom)
Includes fixes to other code to match API changes.
We now have a cmake-format config file.
We no longer use list variables for sources, instead using
target_sources when we need to add, in accordance with current
best practice. (This makes it a lot easier to edit too.) There's no more
include_directories(), add_definitions(), or other gently-deprecated
directory-scoped commands, nor any CMake scripts that include
a parent directory reference (named targets instead)