- Make use of "new style" cmake constructs
- Improved CMake if/else/foreach blocks consistency.