FindAIO.cmake 665 B

1234567891011121314151617181920212223242526
  1. # - Find AIO
  2. #
  3. # AIO_INCLUDE - Where to find libaio.h
  4. # AIO_LIBS - List of libraries when using AIO.
  5. # AIO_FOUND - True if AIO found.
  6. find_path(AIO_INCLUDE_DIR
  7. libaio.h
  8. HINTS $ENV{AIO_ROOT}/include)
  9. find_library(AIO_LIBRARIES
  10. aio
  11. HINTS $ENV{AIO_ROOT}/lib)
  12. include(FindPackageHandleStandardArgs)
  13. find_package_handle_standard_args(AIO DEFAULT_MSG AIO_LIBRARIES AIO_INCLUDE_DIR)
  14. mark_as_advanced(AIO_INCLUDE_DIR AIO_LIBRARIES)
  15. if (AIO_FOUND AND NOT TARGET AIO::aio)
  16. add_library(AIO::aio UNKNOWN IMPORTED)
  17. set_target_properties(AIO::aio PROPERTIES
  18. IMPORTED_LOCATION ${AIO_LIBRARIES}
  19. INTERFACE_INCLUDE_DIRECTORIES ${AIO_INCLUDE_DIR}
  20. )
  21. endif()