Just in case anybody else needs to do this, simply go to the "automake manager"
There click on the project name (in my case it's cgs) and from there click the spanner and wratchet. That will bring up a dialogue with "libraries" which you can add libraries with.
Then everythign will build fine.
Now to find out how to get KDevelop to debug my app!