1
0

FindCURL.cmake 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # - Find curl
  2. # Find the native CURL headers and libraries.
  3. #
  4. # CURL_INCLUDE_DIRS - where to find curl/curl.h, etc.
  5. # CURL_LIBRARIES - List of libraries when using curl.
  6. # CURL_FOUND - True if curl found.
  7. #=============================================================================
  8. # Copyright 2006-2009 Kitware, Inc.
  9. #
  10. # Distributed under the OSI-approved BSD License (the "License");
  11. # see accompanying file Copyright.txt for details.
  12. #
  13. # This software is distributed WITHOUT ANY WARRANTY; without even the
  14. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. # See the License for more information.
  16. #=============================================================================
  17. # (To distributed this file outside of CMake, substitute the full
  18. # License text for the above reference.)
  19. # Look for the header file.
  20. FIND_PATH(CURL_INCLUDE_DIR NAMES curl/curl.h)
  21. MARK_AS_ADVANCED(CURL_INCLUDE_DIR)
  22. # Look for the library.
  23. FIND_LIBRARY(CURL_LIBRARY NAMES curl)
  24. MARK_AS_ADVANCED(CURL_LIBRARY)
  25. # handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
  26. # all listed variables are TRUE
  27. INCLUDE(FindPackageHandleStandardArgs)
  28. FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR)
  29. IF(CURL_FOUND)
  30. SET(CURL_LIBRARIES ${CURL_LIBRARY})
  31. SET(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR})
  32. ELSE(CURL_FOUND)
  33. SET(CURL_LIBRARIES)
  34. SET(CURL_INCLUDE_DIRS)
  35. ENDIF(CURL_FOUND)