This makes the code a bit less messy. We barely need if(BUILD_...) guards inside the cmake files, just the root CMakeLists.txt.