Files
OpenVR-AdvancedSettings-frame/docs/building_for_linux.md
T
2019-03-19 16:10:35 +01:00

1.8 KiB

Building for Linux

Requirements

The following packages are necessary for compiling:

sudo apt install build-essential qtbase5-dev qttools5-dev qtdeclarative5-dev qtmultimedia5-dev qt5-default qttools5-dev-tools

If you install Qt 5.12 you should have the above packages.

Along with either clang or g++. At least g++-7 is required, due to C++17 support.

For linting with clang-tidy the following are necessary:

sudo apt install bear clang-tidy

All applications are required to be in the PATH.

Locations and Environment Variables

The following environmental variables are relevant for building the project.

Environment Variable Purpose
QMAKE_SPEC The mkspec to compile to. Either linux-g++ or linux-clang. Defaults to linux-g++.
USE_TIDY If set a compilation database will be created and the project linted. Can only be used with clang.

If an environment variable isn't set a default value will be provided. The default values are shown in the table below.

Building

With the programs above installed and environment variables set, go into the root folder of the repository and run ./build_scripts/linux/build_linux.sh.

If you copy the third-party/openvr/lib/linux64/libopenvr_api.so file into /lib you can run the AdvancedSettings file without anything else. Otherwise you'll need to run the run-with-library.sh file.

Contributing

For full details, see CONTRIBUTING.md.