# OpenVR Samples: CMake build guide.
## Support
| Configuration | 32 | 64 |
| ----------------------- |:---------:|----------:|
| GNU/Linux (gcc 4.8+) | OK | OK |
| Windows (msvc 12) | OK | OK |
| OSX (clang) | ~ | ~ |
## Dependencies
* Qt 5.x
* GLEW 1.11+
* SDL2
* OpenVR
The only general external dependency is Qt5.<br/>
On GNU/Linux, you will need GLEW 1.11 (available on most package manager).<br/>
On Windows x64, you will need the SDL2 runtime library.
## Build
**Important:**<br/>
*you might need to specify Qt5 cmake module path manually when generating the cache for the first time using the __CMAKE_PREFIX_PATH__ macro (see examples below).*
We will use the command-line on Unix and [Git Bash](https://git-for-windows.github.io/) on Windows.
First, move from the repository root to the samples directory to create a build directory:
```
cd samples
mkdir build; cd build
```
Then, depending on your system:
### Unix
Generate the CMake cache using Makefile:
```
cmake .. -G Makefile -DCMAKE_PREFIX_PATH=/opt/Qt/5.6/gcc_64/lib/cmake -DCMAKE_BUILD_TYPE=Release
```
To build type:
```
make -j4
```
### Windows
Generate the CMake cache using MSVC 12 for x64:
```
cmake .. -G "Visual Studio 12 2013 Win64" -DCMAKE_PREFIX_PATH=C:/Qt/5.6/msvc2013_64/lib/cmake
```
Alternatively, you can force the compilation on x86 architectures by using the **PLATFORM** property (*be sure to use the right generator and Qt binaries*):
```
cmake .. -G "Visual Studio 12 2013" -DCMAKE_PREFIX_PATH=C:/Qt/5.6/msvc2013/lib/cmake -DPLATFORM=32
```
To build, simply type:
```
cmake --build . --target all --config Release
```
*Note : using CMake, the build configuration type (ie. Debug, Release) is set at Build Time with MSVC and at Cache Generation Time with Makefile.*
---
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
OpenVR SDK OpenVR是一种API和运行时,它允许从多个供应商访问VR硬件,而无需应用程序具有他们所针对的硬件的特定知识。 该存储库是一个包含API和示例的SDK。 运行时位于Steam上的工具中的SteamVR下。 文献资料 API的文档可在上 有关OpenVR和SteamVR的更多信息,请访问
资源详情
资源评论
资源推荐
收起资源包目录
openvr:OpenVR SDK (740个子文件)
libSDL2-2.0.so.0 1.04MB
libSDL2-2.0.so.0 1.02MB
libSDL2_static.a 8.7MB
libSDL2_static.a 5.4MB
libSDL2.a 2.63MB
libGLEW.a 1.75MB
New Terrain.asset 1.02MB
ProjectSettings.asset 36KB
ProjectSettings.asset 36KB
InputManager.asset 5KB
InputManager.asset 5KB
QualitySettings.asset 5KB
QualitySettings.asset 5KB
NavMeshAreas.asset 4KB
NavMeshAreas.asset 4KB
Physics2DSettings.asset 4KB
TagManager.asset 4KB
TagManager.asset 4KB
Physics2DSettings.asset 4KB
DynamicsManager.asset 4KB
DynamicsManager.asset 4KB
GraphicsSettings.asset 4KB
GraphicsSettings.asset 4KB
EditorSettings.asset 4KB
EditorSettings.asset 4KB
AudioManager.asset 4KB
AudioManager.asset 4KB
UnityConnectSettings.asset 4KB
UnityAdsSettings.asset 4KB
UnityAdsSettings.asset 4KB
UnityConnectSettings.asset 4KB
TimeManager.asset 4KB
NetworkManager.asset 4KB
NetworkManager.asset 4KB
TimeManager.asset 4KB
EditorBuildSettings.asset 4KB
ClusterInputManager.asset 4KB
EditorBuildSettings.asset 4KB
ClusterInputManager.asset 4KB
build_vulkan_shaders.bat 430B
vlinterm.c 18KB
chew.c 1KB
SDL_config.h.cmake 16KB
Toolchain-clang.cmake 268B
lodepng.cpp 210KB
hellovr_vulkan_main.cpp 150KB
jsoncpp.cpp 148KB
hellovr_dx12_main.cpp 84KB
hellovr_opengl_main.cpp 61KB
hmd_opencv_sandbox.cpp 31KB
opencv_process.cpp 24KB
pathtools_public.cpp 24KB
hmderrors_public.cpp 23KB
camera_app.cpp 22KB
driver_sample.cpp 21KB
pathtools.cpp 20KB
Matrices.cpp 18KB
tracked_camera_openvr_sample.cpp 18KB
strtools_public.cpp 18KB
vrpathregistry_public.cpp 13KB
strtools.cpp 13KB
openvroverlaycontroller.cpp 12KB
geometry_object.cpp 11KB
openvr_api_public.cpp 9KB
shader_file.cpp 4KB
common_hello.cpp 3KB
vrterminal.cpp 3KB
dirtools_public.cpp 2KB
envvartools_public.cpp 2KB
sharedlibtools_public.cpp 1KB
driverlog.cpp 941B
main.cpp 463B
main.cpp 408B
overlaywidget.cpp 311B
openvr_api.cs 334KB
openvr_api.cs 145KB
openvr_api.cs 145KB
SteamVR_RenderModel.cs 20KB
SteamVR_RenderModel.cs 20KB
SteamVR_Settings.cs 20KB
SteamVR_Settings.cs 19KB
SteamVR_LoadLevel.cs 15KB
SteamVR_LoadLevel.cs 15KB
SteamVR.cs 12KB
SteamVR.cs 12KB
SteamVR_Render.cs 11KB
SteamVR_Utils.cs 11KB
SteamVR_Utils.cs 11KB
SteamVR_Camera.cs 11KB
SteamVR_Camera.cs 11KB
SteamVR_Render.cs 11KB
SteamVR_Controller.cs 9KB
SteamVR_Controller.cs 9KB
SteamVR_SkyboxEditor.cs 9KB
SteamVR_ExternalCamera.cs 8KB
SteamVR_ExternalCamera.cs 8KB
SteamVR_TrackedController.cs 8KB
SteamVR_TrackedController.cs 8KB
SteamVR_Menu.cs 8KB
SteamVR_Menu.cs 8KB
共 740 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8
kudrei
- 粉丝: 37
- 资源: 4758
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1