Linking and Using pthread in Linux Ubuntu

I’ve got the same problem. Under Windows one can just modfy the VC project file and add a library but not sure how that works under Linux. Also the /Source directory has no CMakeLists.txt.
In particular I have a machine learning library which I need to add. Can be static or dynamic. Any help very much appreciated.