hiredis-config.cmake 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. ####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
  2. ####### Any changes to this file will be overwritten by the next CMake run ####
  3. ####### The input file was hiredis-config.cmake.in ########
  4. get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
  5. macro(set_and_check _var _file)
  6. set(${_var} "${_file}")
  7. if(NOT EXISTS "${_file}")
  8. message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
  9. endif()
  10. endmacro()
  11. macro(check_required_components _NAME)
  12. foreach(comp ${${_NAME}_FIND_COMPONENTS})
  13. if(NOT ${_NAME}_${comp}_FOUND)
  14. if(${_NAME}_FIND_REQUIRED_${comp})
  15. set(${_NAME}_FOUND FALSE)
  16. endif()
  17. endif()
  18. endforeach()
  19. endmacro()
  20. ####################################################################################
  21. set_and_check(hiredis_INCLUDEDIR "${PACKAGE_PREFIX_DIR}/include")
  22. IF (NOT TARGET hiredis::hiredis)
  23. INCLUDE(${CMAKE_CURRENT_LIST_DIR}/hiredis-targets.cmake)
  24. ENDIF()
  25. SET(hiredis_LIBRARIES hiredis::hiredis)
  26. SET(hiredis_INCLUDE_DIRS ${hiredis_INCLUDEDIR})
  27. check_required_components(hiredis)