FindCEC.cmake 559 B

1234567891011121314151617181920
  1. # - Try to find CEC
  2. # Once done this will define
  3. #
  4. # CEC_FOUND - system has libcec
  5. # CEC_INCLUDE_DIRS - the libcec include directory
  6. # CEC_LIBRARIES - The libcec libraries
  7. if(PKG_CONFIG_FOUND)
  8. pkg_check_modules (CEC libcec>=3.0.0)
  9. else()
  10. find_path(CEC_INCLUDE_DIRS libcec/cec.h)
  11. find_library(CEC_LIBRARIES cec)
  12. endif()
  13. include(FindPackageHandleStandardArgs)
  14. find_package_handle_standard_args(CEC DEFAULT_MSG CEC_INCLUDE_DIRS CEC_LIBRARIES)
  15. list(APPEND CEC_DEFINITIONS -DHAVE_LIBCEC=1)
  16. mark_as_advanced(CEC_INCLUDE_DIRS CEC_LIBRARIES CEC_DEFINITIONS)