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_Regex.cmake 1.5KB

3 years ago
12345678910111213141516171819202122232425262728293031323334353637
  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_Regex)
  7. IF(UNIX)
  8. FIND_LIBRARY(LIB_Boost_Regex NAMES "boost_regex-mt" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib NO_DEFAULT_PATH)
  9. FIND_LIBRARY(LIB_Boost_Regex NAMES "boost_regex-mt" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib)
  10. IF(LIB_Boost_Regex)
  11. OV_PRINT(OV_PRINTED " Found Boost regex...")
  12. OV_PRINT(OV_PRINTED " [ OK ] lib ${LIB_Boost_Regex}")
  13. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_Boost_Regex} )
  14. ELSE(LIB_Boost_Regex)
  15. # 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
  16. FIND_LIBRARY(LIB_Boost_Regex NAMES "boost_regex" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib NO_DEFAULT_PATH)
  17. FIND_LIBRARY(LIB_Boost_Regex NAMES "boost_regex" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib)
  18. IF(LIB_Boost_Regex)
  19. OV_PRINT(OV_PRINTED " Found Boost regex...")
  20. OV_PRINT(OV_PRINTED " [ OK ] lib ${LIB_Boost_Regex}")
  21. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_Boost_Regex})
  22. ELSE(LIB_Boost_Regex)
  23. OV_PRINT(OV_PRINTED " [FAILED] lib boost_regex-mt")
  24. OV_PRINT(OV_PRINTED " [FAILED] lib boost_regex")
  25. ENDIF(LIB_Boost_Regex)
  26. ENDIF(LIB_Boost_Regex)
  27. ENDIF(UNIX)
  28. IF(WIN32)
  29. OV_LINK_BOOST_LIB("regex" ${OV_WIN32_BOOST_VERSION})
  30. ENDIF(WIN32)
  31. SET_PROPERTY(GLOBAL PROPERTY OV_TRIED_ThirdPartyBoost_Regex "Yes")