Findlibwebsockets.cmake 961 B

123456789101112131415161718192021222324252627282930313233
  1. # This module tries to find libWebsockets library and include files
  2. #
  3. # LIBWEBSOCKETS_INCLUDE_DIR, path where to find libwebsockets.h
  4. # LIBWEBSOCKETS_LIBRARY_DIR, path where to find libwebsockets.so
  5. # LIBWEBSOCKETS_LIBRARIES, the library to link against
  6. # LIBWEBSOCKETS_FOUND, If false, do not try to use libWebSockets
  7. #
  8. # This currently works probably only for Linux
  9. FIND_PATH ( LIBWEBSOCKETS_INCLUDE_DIR libwebsockets.h
  10. /usr/local/include
  11. /usr/include
  12. )
  13. FIND_LIBRARY ( LIBWEBSOCKETS_LIBRARIES websockets
  14. /usr/local/lib
  15. /usr/lib
  16. )
  17. GET_FILENAME_COMPONENT( LIBWEBSOCKETS_LIBRARY_DIR ${LIBWEBSOCKETS_LIBRARIES} PATH )
  18. SET ( LIBWEBSOCKETS_FOUND "NO" )
  19. IF ( LIBWEBSOCKETS_INCLUDE_DIR )
  20. IF ( LIBWEBSOCKETS_LIBRARIES )
  21. SET ( LIBWEBSOCKETS_FOUND "YES" )
  22. ENDIF ( LIBWEBSOCKETS_LIBRARIES )
  23. ENDIF ( LIBWEBSOCKETS_INCLUDE_DIR )
  24. MARK_AS_ADVANCED(
  25. LIBWEBSOCKETS_LIBRARY_DIR
  26. LIBWEBSOCKETS_INCLUDE_DIR
  27. LIBWEBSOCKETS_LIBRARIES
  28. )