CMake: start to generalize rules for non-x86 architectures