zlib-config.cmake 1.2 KB

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