Error when building Astra SDK on Ubuntu 14.04

It’s a CMAKE variable, not an environment variable and it should point to the library itself. To set it on the command line, add -DOpenNI2_LIBRARY=~/vendor/openni2/ubuntu-x64/libOpenNI2.so to your cmake command. Alternately if you want to use your own build of OpenNI you can set it to the location of your library.