FindCEC.cmake 632 B

123456789101112131415161718192021222324252627
  1. if(CEC_INCLUDE_DIR)
  2. # Already in cache, be silent
  3. set(CEC_FIND_QUIETLY TRUE)
  4. endif(CEC_INCLUDE_DIR)
  5. if (PKG_CONFIG_FOUND)
  6. pkg_check_modules(_CEC QUIET libcec>=2.0)
  7. endif (PKG_CONFIG_FOUND)
  8. Find_Path(CEC_INCLUDE_DIR
  9. NAMES cec/cec.h libcec/cec.h
  10. PATHS /usr/include usr/local/include
  11. PATH_SUFFIXES cec cec/cec libcec cec/include
  12. HINTS ${_CEC_INCLUDEDIR}
  13. )
  14. Find_Library(CEC_LIBRARY
  15. NAMES cec
  16. PATHS /usr/lib usr/local/lib
  17. PATH_SUFFIXES cec libcec cec/lib libcec/lib
  18. HINTS ${_CEC_LIBDIR}
  19. )
  20. include(FindPackageHandleStandardArgs)
  21. find_package_handle_standard_args(CEC DEFAULT_MSG CEC_LIBRARY CEC_INCLUDE_DIR)