IF(NOT DEFINED CGET_OpenSSL_REGISTRY_VERSION)
  SET(CGET_OpenSSL_REGISTRY_VERSION 74c8715edacb05ebc5ccf7f6bba641618f810424)
ENDIF()

IF(NOT DEFINED CGET_Libssh2_REGISTRY_VERSION)
  SET(CGET_Libssh2_REGISTRY_VERSION a751a893ca36ec8e95ba31439201cc52083cef57)
ENDIF()

CGET_HAS_DEPENDENCY(OpenSSL REGISTRY COMMIT_ID "${CGET_OpenSSL_REGISTRY_VERSION}" NO_FIND_PACKAGE)
CGET_HAS_DEPENDENCY(Libssh2 REGISTRY COMMIT_ID "${CGET_Libssh2_REGISTRY_VERSION}" VERSION master)

SET(CURL_BUILD_OPTIONS "-DBUILD_CURL_TESTS=OFF -DBUILD_CURL_EXE=OFF" )

if(${CMAKE_CROSSCOMPILING})
  # Disable all the try_runs for cross compilation
  SET(CURL_BUILD_OPTIONS "${CURL_BUILD_OPTIONS} -DHAVE_POLL_FINE:BOOL=OFF -DHAVE_STRERROR_R:BOOL=OFF -DHAVE_GLIBC_STRERROR_R_COMPILE:BOOL=OFF -DHAVE_POSIX_STRERROR_R_COMPILE:BOOL=OFF" )
endif()

if(MSVC)
  SET(CURL_BUILD_OPTIONS "${CURL_BUILD_OPTIONS} -DHAVE_SCHANNEL_H:BOOL=OFF")
endif()

CGET_HAS_DEPENDENCY(CURL GITHUB bagder/curl VERSION curl-7_45_0
  OPTIONS "${CURL_BUILD_OPTIONS}" )  
