Add dependencies to another CMake project the correct way.