Skip to main content
Up and Coming
July 10, 2015

How to simply set "OVRSDKROOT" env.variable

The latest SDKs "OculusRoomTiny" samples use the environment variable "OVRSDKROOT" to define the path to the current SDK. You can also use this by just copy+paste the following lines from the "OculusRoomTiny" visual studio project settings :
$(OVRSDKROOT)LibOVR/Include/;%(AdditionalIncludeDirectories)

(project settings->C/C++->AdditionalIncludeDirectories)
$(OVRSDKROOT)LibOVR/Lib/Windows/$(Platform)/$(Configuration)/VS2012/LibOVR.lib;%(AdditionalDependencies)

(project settings->Linker->AdditionalDependencies)

Using this line in your project (while always defining >OVRSDKROOT< whenever a new SDK comes out) keeps your project up to date to the latest SDK.

Note that this environment variable is not automatically defined by just unpacking the SDK. You need to define this in "Start, Control Panel, System (in System and Security), Advanced System Settings, Environment Variables".

OR you can very easily define this by batch file. Create a batch file (f.i. "SetEnvVariable.bat") and copy following line to it :

setx -m OVRSDKROOT %~dp0


So, whenever a new SDK comes out, copy+paste this batch file to the SKDs folder ("...\OculusSDK\."). Simply run the batch file AS ADMINISTRATOR and your environment variable is set.

    1 reply

    Inspiring
    July 10, 2015
    Awesome, thanks.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV