# HG changeset patch # User Sebastien Jodogne # Date 1523958121 -7200 # Node ID 373d75b90d3be4ebec3d7ba4b660ca6edf82b3a8 # Parent e7f86a9f0f79111c581b8b3c2f412ace1dd1dc84 fix diff -r e7f86a9f0f79 -r 373d75b90d3b Resources/DownloadOrthancFramework.cmake --- a/Resources/DownloadOrthancFramework.cmake Tue Apr 17 11:27:51 2018 +0200 +++ b/Resources/DownloadOrthancFramework.cmake Tue Apr 17 11:42:01 2018 +0200 @@ -43,16 +43,6 @@ endif() -if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "hg" OR - ORTHANC_FRAMEWORK_SOURCE STREQUAL "web") - if (NOT STATIC_BUILD AND - NOT ALLOW_DOWNLOADS) - message(FATAL_ERROR "CMake is not allowed to download from Internet. Please set the ALLOW_DOWNLOADS option to ON") - endif() -endif() - - - ## ## Detection of the requested version ## @@ -161,8 +151,12 @@ ## if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "hg") + if (NOT STATIC_BUILD AND NOT ALLOW_DOWNLOADS) + message(FATAL_ERROR "CMake is not allowed to download from Internet. Please set the ALLOW_DOWNLOADS option to ON") + endif() + set(ORTHANC_ROOT ${CMAKE_BINARY_DIR}/orthanc) - + if (NOT EXISTS ${ORTHANC_ROOT}) message("Forking the Orthanc source repository using Mercurial") @@ -216,6 +210,10 @@ set(ORTHANC_FRAMEWORK_ARCHIVE "${CMAKE_SOURCE_DIR}/ThirdPartyDownloads/${ORTHANC_FRAMEMORK_FILENAME}") if (NOT EXISTS "${ORTHANC_FRAMEWORK_ARCHIVE}") + if (NOT STATIC_BUILD AND NOT ALLOW_DOWNLOADS) + message(FATAL_ERROR "CMake is not allowed to download from Internet. Please set the ALLOW_DOWNLOADS option to ON") + endif() + message("Downloading: ${ORTHANC_FRAMEWORK_ARCHIVE}") file(DOWNLOAD