WtFindAsio.txt 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Attention: must have done WtFindBoost.txt before this one!
  2. #
  3. # This defines:
  4. # - ASIO_INCLUDE_DIRS
  5. # - ASIO_LIBRARIES
  6. # - ASIO_DEFINITIONS
  7. # - ASIO_FOUND
  8. #
  9. # This file will search for both plain and boost kinds of asio, and
  10. # set up the correct includes and libraries
  11. # ASIO_LIBRARIES is set to the boost system library, if the boost
  12. # version of asio was detected. Otherwise, it remains empty.
  13. #FIND_PATH(PLAIN_ASIO_INCLUDE
  14. # NAMES
  15. # asio.hpp
  16. # PATHS
  17. # ${BOOST_INCLUDE_DIRS}
  18. # /usr/include
  19. # /usr/local/include
  20. #)
  21. IF(BOOST_WTHTTP_FOUND)
  22. FIND_PATH(BOOST_ASIO_INCLUDE
  23. NAMES
  24. boost/asio.hpp
  25. PATHS
  26. ${BOOST_INCLUDE_DIRS}
  27. NO_DEFAULT_PATH
  28. )
  29. ENDIF(BOOST_WTHTTP_FOUND)
  30. SET(ASIO_FOUND FALSE)
  31. SET(ASIO_DEFINITIONS "")
  32. SET(ASIO_LIBRARIES "")
  33. SET(ASIO_INCLUDE_DIRS "")
  34. IF(PLAIN_ASIO_INCLUDE)
  35. SET (ASIO_INCLUDE_DIRS ${PLAIN_ASIO_INCLUDE})
  36. SET (ASIO_LIBRARIES "")
  37. SET(ASIO_FOUND TRUE)
  38. ELSE(PLAIN_ASIO_INCLUDE)
  39. IF(BOOST_ASIO_INCLUDE
  40. AND DEFINED BOOST_WT_SYSTEM_LIBRARY)
  41. SET (ASIO_INCLUDE ${BOOST_ASIO_INCLUDE})
  42. SET(ASIO_DEFINITIONS -DBOOST_ASIO)
  43. SET(ASIO_LIBRARIES ${BOOST_WT_SYSTEM_LIBRARY})
  44. SET(ASIO_FOUND TRUE)
  45. ENDIF(BOOST_ASIO_INCLUDE
  46. AND DEFINED BOOST_WT_SYSTEM_LIBRARY)
  47. ENDIF(PLAIN_ASIO_INCLUDE)