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_FileSystem.cmake 1.0KB

1234567891011121314151617181920212223242526272829303132
  1. # ---------------------------------
  2. # Finds third party boost
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. IF(APPLE)
  7. find_package(Boost 1.60.0 COMPONENTS filesystem system)
  8. if(Boost_FOUND)
  9. include_directories(${Boost_INCLUDE_DIRS})
  10. target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})
  11. endif()
  12. ELSEIF(UNIX)
  13. find_package(Boost 1.54.0 COMPONENTS filesystem system)
  14. if(Boost_FOUND)
  15. include_directories(${Boost_INCLUDE_DIRS})
  16. target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})
  17. endif()
  18. # For Fedora
  19. FIND_LIBRARY(LIB_STANDARD_MODULE_PTHREAD pthread)
  20. IF(LIB_STANDARD_MODULE_PTHREAD)
  21. debug_message( " Found pthread...")
  22. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_STANDARD_MODULE_PTHREAD})
  23. ELSE(LIB_STANDARD_MODULE_PTHREAD)
  24. MESSAGE(WARNING " FAILED to find pthread...")
  25. ENDIF(LIB_STANDARD_MODULE_PTHREAD)
  26. ENDIF()
  27. IF(WIN32)
  28. OV_LINK_BOOST_LIB("filesystem" ${OV_WIN32_BOOST_VERSION} )
  29. OV_LINK_BOOST_LIB("system" ${OV_WIN32_BOOST_VERSION} ) # filesystem depends on system
  30. ENDIF(WIN32)