Clean up the remainder of the existing library CMake files (add necessary libraries to linking lines, etc.) and add ccmath in external to the build.