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.4KB

1234567891011121314151617181920212223242526272829303132
  1. # ---------------------------------
  2. # Finds third party boost
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. IF(UNIX)
  7. FIND_LIBRARY(LIB_Boost_Filesystem NAMES "boost_filesystem-mt" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib NO_DEFAULT_PATH)
  8. FIND_LIBRARY(LIB_Boost_Filesystem NAMES "boost_filesystem-mt" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib)
  9. FIND_LIBRARY(LIB_Boost_Filesystem NAMES "boost_filesystem" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib NO_DEFAULT_PATH)
  10. FIND_LIBRARY(LIB_Boost_Filesystem NAMES "boost_filesystem" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib)
  11. IF(LIB_Boost_Filesystem)
  12. debug_message( " [ OK ] lib ${LIB_Boost_Filesystem}")
  13. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_Boost_Filesystem} )
  14. ELSE(LIB_Boost_Filesystem)
  15. MESSAGE(WARNING " [FAILED] lib boost_Filesystem-mt")
  16. ENDIF(LIB_Boost_Filesystem)
  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. ENDIF(UNIX)
  26. IF(WIN32)
  27. OV_LINK_BOOST_LIB("filesystem" ${OV_WIN32_BOOST_VERSION} )
  28. OV_LINK_BOOST_LIB("system" ${OV_WIN32_BOOST_VERSION} ) # filesystem depends on system
  29. ENDIF(WIN32)