FindLZ4.cmake 566 B

1234567891011121314151617181920212223242526
  1. # - Try to find LZ4
  2. # Once done, this will define
  3. #
  4. # LZ4_FOUND - system has LZ4
  5. # LZ4_INCLUDE_DIRS - the LZ4 include directories
  6. # LZ4_LIBRARIES - the LZ4 library
  7. find_package(PkgConfig)
  8. pkg_check_modules(LZ4_PKGCONF liblz4)
  9. find_path(LZ4_INCLUDE_DIRS
  10. NAMES lz4frame.h
  11. PATHS ${LZ4_PKGCONF_INCLUDE_DIRS}
  12. )
  13. find_library(LZ4_LIBRARIES
  14. NAMES lz4
  15. PATHS ${LZ4_PKGCONF_LIBRARY_DIRS}
  16. )
  17. include(FindPackageHandleStandardArgs)
  18. find_package_handle_standard_args(LZ4 DEFAULT_MSG LZ4_INCLUDE_DIRS LZ4_LIBRARIES)
  19. mark_as_advanced(LZ4_INCLUDE_DIRS LZ4_LIBRARIES)