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_System.cmake 1.4KB

1234567891011121314151617181920212223242526272829303132333435
  1. # ---------------------------------
  2. # Finds third party boost
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. GET_PROPERTY(OV_PRINTED GLOBAL PROPERTY OV_TRIED_ThirdPartyBoost_System)
  7. IF(UNIX)
  8. FIND_LIBRARY(LIB_Boost_System NAMES "boost_system-mt" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib NO_DEFAULT_PATH)
  9. FIND_LIBRARY(LIB_Boost_System NAMES "boost_system-mt" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib)
  10. IF(LIB_Boost_System)
  11. OV_PRINT(OV_PRINTED " [ OK ] lib ${LIB_Boost_System}")
  12. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_Boost_System} )
  13. ELSE(LIB_Boost_System)
  14. # Fedora 20 and Ubuntu 13.10,14.04 have no more multi-thread boost libs ( *-mt ) so try if there are non -mt libs to link
  15. FIND_LIBRARY(LIB_Boost_System NAMES "boost_system" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib NO_DEFAULT_PATH)
  16. FIND_LIBRARY(LIB_Boost_System NAMES "boost_system" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib)
  17. IF(LIB_Boost_System)
  18. OV_PRINT(OV_PRINTED " [ OK ] lib ${LIB_Boost_System}")
  19. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_Boost_System})
  20. ELSE(LIB_Boost_System)
  21. OV_PRINT(OV_PRINTED " [FAILED] lib boost_system-mt")
  22. OV_PRINT(OV_PRINTED " [FAILED] lib boost_system")
  23. ENDIF(LIB_Boost_System)
  24. ENDIF(LIB_Boost_System)
  25. ENDIF(UNIX)
  26. IF(WIN32)
  27. OV_LINK_BOOST_LIB("system" ${OV_WIN32_BOOST_VERSION})
  28. ENDIF(WIN32)
  29. SET_PROPERTY(GLOBAL PROPERTY OV_TRIED_ThirdPartyBoost_System "Yes")