WebPConfig.cmake 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. set(WebP_VERSION 1.3.2)
  2. set(WEBP_VERSION ${WebP_VERSION})
  3. ####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
  4. ####### Any changes to this file will be overwritten by the next CMake run ####
  5. ####### The input file was WebPConfig.cmake.in ########
  6. get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)
  7. macro(set_and_check _var _file)
  8. set(${_var} "${_file}")
  9. if(NOT EXISTS "${_file}")
  10. message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
  11. endif()
  12. endmacro()
  13. macro(check_required_components _NAME)
  14. foreach(comp ${${_NAME}_FIND_COMPONENTS})
  15. if(NOT ${_NAME}_${comp}_FOUND)
  16. if(${_NAME}_FIND_REQUIRED_${comp})
  17. set(${_NAME}_FOUND FALSE)
  18. endif()
  19. endif()
  20. endforeach()
  21. endmacro()
  22. ####################################################################################
  23. if(TRUE)
  24. include(CMakeFindDependencyMacro)
  25. find_dependency(Threads REQUIRED)
  26. endif()
  27. include("${CMAKE_CURRENT_LIST_DIR}/WebPTargets.cmake")
  28. set_and_check(WebP_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include")
  29. set(WEBP_INCLUDE_DIRS ${WebP_INCLUDE_DIRS})
  30. set(WebP_LIBRARIES "libwebpdecoder;libwebp;libwebpdemux;libwebpmux")
  31. set(WEBP_LIBRARIES "${WebP_LIBRARIES}")
  32. check_required_components(WebP)