1234567891011121314151617181920212223
  1. # - Find rt
  2. # Find the rt libraries, this is to fix ubuntu not having clock_gettime defined without it.
  3. #
  4. # This module defines the following variables:
  5. # RT_FOUND - 1 if RT_INCLUDE_DIR & RT_LIBRARY are found, 0 otherwise
  6. # RT_INCLUDE_DIR - where to find Xlib.h, etc.
  7. # RT_LIBRARY - the X11 library
  8. #
  9. find_path( RT_INCLUDE_DIR
  10. NAMES time.h )
  11. find_library( RT_LIBRARY
  12. NAMES rt
  13. PATHS /usr/lib /lib )
  14. if( RT_INCLUDE_DIR AND RT_LIBRARY )
  15. set( RT_FOUND 1 )
  16. else()
  17. set( RT_FOUND 0 )
  18. endif()
  19. mark_as_advanced( RT_INCLUDE_DIR RT_LIBRARY )