From 2bfdc5e0748de746a3dbe27bf82be87f343caa0c Mon Sep 17 00:00:00 2001 From: gineshidalgo99 Date: Thu, 12 Apr 2018 09:27:38 -0400 Subject: [PATCH] Added pthread in Ubuntu --- CMakeLists.txt | 10 +++++++--- doc/faq.md | 8 ++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c8cb5b08..01dd1c34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -201,11 +201,11 @@ option(BUILD_SHARED_LIBS "Build as shared lib" ON) # Speed profiler option(PROFILER_ENABLED "If enabled, OpenPose will be able to print out speed information at runtime." OFF) -# Threads -if (${GPU_MODE} MATCHES "OPENCL") +# Threads - Pthread +if (${GPU_MODE} MATCHES "OPENCL" OR (UNIX AND NOT APPLE)) unset(CMAKE_THREAD_LIBS_INIT CACHE) find_package(Threads) -endif () +endif (${GPU_MODE} MATCHES "OPENCL" OR (UNIX AND NOT APPLE)) ### FIND REQUIRED PACKAGES list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") @@ -607,6 +607,10 @@ endif (WITH_CERES) if (WITH_FLIR_CAMERA) set(OpenPose_3rdparty_libraries ${OpenPose_3rdparty_libraries} ${SPINNAKER_LIB}) endif (WITH_FLIR_CAMERA) +# Pthread +if (UNIX AND NOT APPLE) + set(OpenPose_3rdparty_libraries ${OpenPose_3rdparty_libraries} pthread) +endif (UNIX AND NOT APPLE) set(examples_3rdparty_libraries ${OpenPose_3rdparty_libraries} ${GFLAGS_LIBRARY}) diff --git a/doc/faq.md b/doc/faq.md index 444fc177..6a5b798d 100644 --- a/doc/faq.md +++ b/doc/faq.md @@ -11,6 +11,7 @@ OpenPose - Frequently Asked Question (FAQ) 6. [Cannot Find OpenPose.dll Error](#cannot-find-openpose.dll-error-windows) 7. [Free Invalid Pointer Error](#free-invalid-pointer-error) 8. [Source Directory does not Contain CMakeLists.txt (Windows)](#source-directory-does-not-contain-cmakelists.txt-windows) + 9. [How Should I Link my IP Camera?](#how-should-i-link-my-ip-camera) @@ -80,3 +81,10 @@ Note: OpenPose library is not an executable, but a library. So instead clicking **Q: I am getting an error of the type: `The source directory {path to file} does not contain a CMakeLists.txt file.`.** **A**: You might not have writing access to that folder. If you are in Windows, you should not try to install it in `Program Files`. + + + +### How Should I Link my IP Camera? +**Q: How Should I Link my IP Camera with http protocol?.** + +**A**: Usually with `http://CamIP:PORT_NO./video?x.mjpeg`. -- GitLab