File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ find_package( OpenCV REQUIRED )
3434IF (WIN32 )
3535 set (PTHREADS_INCLUDE_DIR "" CACHE PATH "Pthreads Include Directory" )
3636 set (PTHREADS_LIB_DIR "" CACHE PATH "Pthreads Lib Directory" )
37+ ELSEIF (UNIX )
38+ find_package (Threads)
3739ENDIF ()
3840
3941# uninstall target
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ if(WIN32)
1818 target_link_libraries (opencvblobslibExample ${PTHREADS_LIB_DIR} /pthreadVC2.lib)
1919 message ("Linked " ${PTHREADS_LIB_DIR} /pthreadVC2.lib)
2020 endif ()
21+ elseif (UNIX )
22+ target_link_libraries (opencvblobslibExample ${CMAKE_THREAD_LIBS_INIT} )
23+ message ("Linked " ${CMAKE_THREAD_LIBS_INIT} )
2124endif ()
2225
2326#I copy the images needed for the example to run
You can’t perform that action at this time.
0 commit comments