build: meson: Add remote driver build

This commit is contained in:
Christoph Haag 2020-11-20 16:12:34 +01:00
parent 9bf58ec275
commit d3ccbce76c
6 changed files with 26 additions and 3 deletions

View file

@ -147,7 +147,7 @@ if 'v4l2' in drivers
endif
if 'auto' in drivers
drivers += ['dummy', 'hdk', 'hydra', 'ns', 'psmv']
drivers += ['dummy', 'hdk', 'hydra', 'ns', 'psmv', 'remote']
endif
openhmd = dependency('openhmd', required: openhmd_required)

View file

@ -3,7 +3,7 @@
option('drivers',
type: 'array',
choices: ['auto', 'dummy', 'hdk', 'hydra', 'ns', 'ohmd', 'psmv', 'psvr', 'rs', 'v4l2', 'vive', 'survive', 'daydream', 'arduino'],
choices: ['auto', 'dummy', 'hdk', 'hydra', 'ns', 'ohmd', 'psmv', 'psvr', 'rs', 'v4l2', 'vive', 'survive', 'daydream', 'arduino', 'remote'],
value: ['auto'],
description: 'Set of drivers to build')

View file

@ -107,6 +107,20 @@ lib_drv_rs = static_library(
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_v4l2 = static_library(
'drv_v4l2',
files(

View file

@ -24,8 +24,9 @@
#include <netdb.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#define __USE_MISC // SOL_TCP on C11
#include <netinet/tcp.h>
/*
*

View file

@ -65,6 +65,10 @@ if 'arduino' in drivers
driver_libs += [lib_drv_arduino]
endif
if 'remote' in drivers
driver_libs += [lib_drv_remote]
endif
subdir('common')
subdir('openxr')
subdir('cli')

View file

@ -82,6 +82,10 @@ else
]
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(