Suppose the make fails:
$ make
Launch it instead with make VERBOSE=1 to see the commands executed. Then directly run the linker or compiler command that you'll see. Try to make it work by adding necessary flags or libraries.
Then figure out what to change, so CMake itself can pass correct argum...