FindLibSensors.cmake 678 B

1234567891011121314151617181920212223
  1. # FindLibSensors.cmake
  2. # Locate libsensors library and headers
  3. # Locate the libsensors header file
  4. find_path(LibSensors_INCLUDE_DIRS
  5. NAMES sensors/sensors.h
  6. PATHS /usr/include /usr/local/include
  7. )
  8. # Locate the libsensors library
  9. find_library(LibSensors_LIBRARIES
  10. NAMES sensors
  11. PATHS /usr/lib /usr/local/lib
  12. )
  13. # Check if both the library and header were found
  14. include(FindPackageHandleStandardArgs)
  15. find_package_handle_standard_args(LibSensors
  16. REQUIRED_VARS LibSensors_LIBRARIES LibSensors_INCLUDE_DIRS
  17. )
  18. # Mark the variables as advanced (not shown in the GUI by default)
  19. mark_as_advanced(LibSensors_LIBRARIES LibSensors_INCLUDE_DIRS)