Commit 6ac0bbd8 authored by Jussi Lindgren's avatar Jussi Lindgren

Build: Added pthread for VRPN apps built without boost

Required to build the OpenViBE-to-vrpn example on Linux.
parent 3d449abc
......@@ -17,6 +17,7 @@ INCLUDE_DIRECTORIES(include)
ADD_EXECUTABLE(${PROJECT_NAME} ${source_files})
INCLUDE("FindThirdPartyVRPN")
INCLUDE("FindThirdPartyPThread") # needed on Linux for VRPN
# ---------------------------------
# Target macros
......
# ---------------------------------
# Finds third party pthread lib
# Adds library to target
# Adds include path
# ---------------------------------
IF(UNIX)
FIND_LIBRARY(LIB_STANDARD_MODULE_PTHREAD pthread)
IF(LIB_STANDARD_MODULE_PTHREAD)
MESSAGE(STATUS " Found pthread...")
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_STANDARD_MODULE_PTHREAD})
ELSE(LIB_STANDARD_MODULE_PTHREAD)
MESSAGE(STATUS " FAILED to find pthread...")
ADD_DEFINITIONS(-DTARGET_HAS_PThread)
ENDIF(LIB_STANDARD_MODULE_PTHREAD)
ENDIF(UNIX)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment