Ported old CMake build system.

Try to generate a decent "MORAConfig.cmake" file for use from within other pkgs.