Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
EisernSchild's avatar
EisernSchild
Explorer
10 years ago

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.