BUILD: Add CMake scripts to parse all Makefile.am and register the various targets using CMake instead.

No change is required regarding autotools, and as long as the Makefile.am files stay as simple as they are,
the CMake script that parses them should handle any source addition/removal.

There's still duplication in term of library checks and platform flags, which might be more difficult to
replace, but this is probably not going to change often.