Commit 5d199cce authored by Ghislain MARY's avatar Ghislain MARY
Browse files

URL_HASH command of ExternalProject was not available before CMake 2.8.10.

parent 3b1360f5
......@@ -377,8 +377,17 @@ function(linphone_builder_add_project PROJNAME)
if(NOT "${EP_${PROJNAME}_URL}" STREQUAL "")
set(DOWNLOAD_SOURCE URL ${EP_${PROJNAME}_URL})
if (NOT "${EP_${PROJNAME}_URL_HASH}" STREQUAL "")
list(APPEND DOWNLOAD_SOURCE URL_HASH ${EP_${PROJNAME}_URL_HASH})
if(NOT "${EP_${PROJNAME}_URL_HASH}" STREQUAL "")
if("${CMAKE_VERSION}" VERSION_GREATER "2.8.9")
list(APPEND DOWNLOAD_SOURCE URL_HASH ${EP_${PROJNAME}_URL_HASH})
else()
string(REGEX MATCH "^MD5=([A-Fa-f0-9]+)$" _match ${EP_${PROJNAME}_URL_HASH})
if(NOT "${_match}" STREQUAL "")
string(REGEX REPLACE "MD5=" "" _match ${_match})
list(APPEND DOWNLOAD_SOURCE URL_MD5 ${_match})
endif()
unset(_match)
endif()
endif()
else(NOT "${EP_${PROJNAME}_URL}" STREQUAL "")
set(DOWNLOAD_SOURCE GIT_REPOSITORY ${EP_${PROJNAME}_GIT_REPOSITORY} GIT_TAG ${EP_${PROJNAME}_GIT_TAG})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment