trouble installing cmake
For cmake the easiest way is to install the GUI from the .dmg - which you already have done.

For other users. To install the GUI mount the .dmg and then copy Cmake.app to /Applications (a link to that  is in the disk)

You can run the build from the GUI which asks for the source and target paths and the type of build system to be generated.

Or you can install the command line tools. Choose from the menu in the GUI  Tools->How to install for command line use. This provides instructions on what to do. These are basically telling you where the cmake executable is so that you can add that directory to your PATH

I do use the GUI as it allows easier control of where things are and which build system to generate.