Introduce a variable to identify in-source build

This makes it easier to find all conditionals that test for it (in case
someone may want to fix those), and makes the CMake code easier to read.

Change-Id: Ic7df20cd9829080005d021e101c4559143bb3cc1