Index: src/matchpoint/CMakeLists.txt
===================================================================
--- src/matchpoint/CMakeLists.txt	(revision 2980)
+++ src/matchpoint/CMakeLists.txt	(working copy)
@@ -1,6 +1,13 @@
 
 #list all source files here
 ADD_EXECUTABLE(matchpoint MatchPoint.cpp APImage.cpp HessianDetector.cpp Descriptor.cpp)
+
+CHECK_INCLUDE_FILES (pthread.h HAVE_PTHREAD_H)
+
+IF (HAVE_PTHREAD_H)
+	SET_TARGET_PROPERTIES(matchpoint PROPERTIES LINK_FLAGS -lpthread)
+ENDIF (HAVE_PTHREAD_H)
+
 IF (MSVC)
 	TARGET_LINK_LIBRARIES(matchpoint ${image_libs} hugingetopt)
 #need to link to some other libraries ? just add them here
