You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FindThirdPartyBoost_Thread.cmake 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # ---------------------------------
  2. # Finds third party boost
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. IF(UNIX)
  7. FIND_LIBRARY(LIB_Boost_Thread NAMES "boost_thread-mt" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib NO_DEFAULT_PATH)
  8. FIND_LIBRARY(LIB_Boost_Thread NAMES "boost_thread-mt" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib)
  9. FIND_LIBRARY(LIB_Boost_Thread NAMES "boost_thread" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib NO_DEFAULT_PATH)
  10. FIND_LIBRARY(LIB_Boost_Thread NAMES "boost_thread" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib)
  11. IF(LIB_Boost_Thread)
  12. debug_message( " [ OK ] lib ${LIB_Boost_Thread}")
  13. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_Boost_Thread} )
  14. ELSE(LIB_Boost_Thread)
  15. MESSAGE(WARNING " [FAILED] lib boost_thread-mt")
  16. ENDIF(LIB_Boost_Thread)
  17. # For Fedora
  18. FIND_LIBRARY(LIB_STANDARD_MODULE_PTHREAD pthread)
  19. IF(LIB_STANDARD_MODULE_PTHREAD)
  20. debug_message( " Found pthread...")
  21. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_STANDARD_MODULE_PTHREAD})
  22. ELSE(LIB_STANDARD_MODULE_PTHREAD)
  23. MESSAGE(WARNING " FAILED to find pthread...")
  24. ENDIF(LIB_STANDARD_MODULE_PTHREAD)
  25. # For Ubuntu 13.04 (interprocess/ipc/message_queue.hpp in ovasCPluginExternalStimulations.cpp caused dep)
  26. IF(NOT APPLE)
  27. FIND_LIBRARY(LIB_STANDARD_MODULE_RT rt)
  28. IF(LIB_STANDARD_MODULE_RT)
  29. debug_message( " Found rt...")
  30. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_STANDARD_MODULE_RT})
  31. ELSE(LIB_STANDARD_MODULE_RT)
  32. MESSAGE(WARNING " FAILED to find rt...")
  33. ENDIF(LIB_STANDARD_MODULE_RT)
  34. ENDIF()
  35. ENDIF(UNIX)
  36. IF(WIN32)
  37. OV_LINK_BOOST_LIB("thread" ${OV_WIN32_BOOST_VERSION})
  38. ENDIF(WIN32)