Skip to content

zwin-project/zen-remote

Repository files navigation

ZEN Remote

A library that implements the communication layer between Zen running on the PC and Zen Mirror running on the HMD.

This project will generate libraries for each of the client (Zen Mirror) and server (Zen). The client may run on Android, so the library for the client must be able to build from source with all dependencies.

Issue

Please report issues related to this repository to zwin-project / zen.

Build & Install

gRPC

Clone and build grpc-dev, using the v1.49.1 branch. The following assumes that you have cloned it to $MY_DIR/grpc-dev.

If you have already built grpc-dev, you can use it.

Clone

Clone the zen-remote repo and its submodules

Configuration

The following CMake variable can be set.

  1. ZEN_REMOTE_GRPC_SYSROOT(required)
    Specify a sysroot that contains headers, libraries, executables, etc. When cross-compiling for such as Android, those libraries and executables must be compiled for that target. It’s typically $MY_DIR/grpc-dev/native/Debug.

  2. ZEN_REMOTE_SERVER / ZEN_REMOTE_CLIENT
    Specify a boolean whether to build the server / client library. Default is both ON.

  3. ZEN_REMOTE_PROTOC_EXECUTABLE(optional)
    Specify the path to the protoc executable. The protoc specified here will be executed at build time, so please specify one that is executable on the host machine at build time, even if you cross-compile. If not specified, look for protoc in ZEN_REMOTE_GRPC_SYSROOT and the host machine.

  4. ZEN_REMOTE_GRPC_CPP_PLUGIN_EXECUTABLE(optional)
    Specify the path to the grpc_cpp_plugin executable. The rest is the same as protoc

  5. ZEN_REMOTE_REQUIRED_VERSION(optional)
    Specify the version of zen-remote you expect. We can do version checking, for example, when using zen-remote with add_subdirectory.

  6. ZEN_REMOTE_TEST_CLIENT(optional)
    Specify whether to build test-client or not. Default value is "ON"

You can set these variables via command line arguments or local.cmake

local.cmake
set(ZEN_REMOTE_GRPC_SYSROOT $ENV{MY_DIR}/grpc-dev/native/Debug CACHE STRING "")
set(ZEN_REMOTE_CLIENT OFF CACHE STRING "")

Build & Install

$ cmake -B build -G Ninja
$ cmake --build build
$ sudo cmake --install build