Improves the build system

Cleans up variables.cmake.
Moves target specific code into variables.cmake.

Issue: #50