How to build module dependencies with CMakeLists.txt?

Nothing special is needed, just add the library that you want to use to the list of target libraries and add the directory that contains header files to the include directories. See for example how CropVolume uses the Volumes module.