CURLConfig.cmake 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  9. #
  10. # This software is licensed as described in the file COPYING, which
  11. # you should have received as part of this distribution. The terms
  12. # are also available at https://curl.se/docs/copyright.html.
  13. #
  14. # You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. # copies of the Software, and permit persons to whom the Software is
  16. # furnished to do so, under the terms of the COPYING file.
  17. #
  18. # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. # KIND, either express or implied.
  20. #
  21. # SPDX-License-Identifier: curl
  22. #
  23. ###########################################################################
  24. ####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
  25. ####### Any changes to this file will be overwritten by the next CMake run ####
  26. ####### The input file was curl-config.cmake.in ########
  27. get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
  28. macro(set_and_check _var _file)
  29. set(${_var} "${_file}")
  30. if(NOT EXISTS "${_file}")
  31. message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
  32. endif()
  33. endmacro()
  34. macro(check_required_components _NAME)
  35. foreach(comp ${${_NAME}_FIND_COMPONENTS})
  36. if(NOT ${_NAME}_${comp}_FOUND)
  37. if(${_NAME}_FIND_REQUIRED_${comp})
  38. set(${_NAME}_FOUND FALSE)
  39. endif()
  40. endif()
  41. endforeach()
  42. endmacro()
  43. ####################################################################################
  44. include(CMakeFindDependencyMacro)
  45. if(ON)
  46. find_dependency(OpenSSL 1)
  47. endif()
  48. if(ON)
  49. find_dependency(ZLIB 1)
  50. endif()
  51. include("${CMAKE_CURRENT_LIST_DIR}/CURLTargets.cmake")
  52. check_required_components("CURL")