Mercurial > hg > orthanc-postgresql
changeset 39:38b8d0ce4e17
improved sdk download
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 30 Jul 2015 14:50:33 +0200 |
parents | 829b5196a662 |
children | e633a8ab6f31 |
files | CMakeLists.txt |
diffstat | 1 files changed, 19 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Thu Jul 30 14:34:31 2015 +0200 +++ b/CMakeLists.txt Thu Jul 30 14:50:33 2015 +0200 @@ -57,20 +57,27 @@ # Check that the Orthanc SDK headers are available or download them if (STATIC_BUILD) - #set(ORTHANC_SDK_URL "http://orthanc.googlecode.com/hg") - set(ORTHANC_SDK_URL "http://orthanc.googlecode.com/hg-history/Orthanc-0.9.1") + #set(ORTHANC_SDK_URL "https://bitbucket.org/sjodogne/orthanc/raw/default") + set(ORTHANC_SDK_URL "https://bitbucket.org/sjodogne/orthanc/raw/Orthanc-0.9.1") + file(MAKE_DIRECTORY ${AUTOGENERATED_DIR}/orthanc) - file(DOWNLOAD "${ORTHANC_SDK_URL}/Plugins/Include/orthanc/OrthancCPlugin.h" - "${AUTOGENERATED_DIR}/orthanc/OrthancCPlugin.h" SHOW_PROGRESS) - file(DOWNLOAD "${ORTHANC_SDK_URL}/Plugins/Include/orthanc/OrthancCDatabasePlugin.h" - "${AUTOGENERATED_DIR}/orthanc/OrthancCDatabasePlugin.h" SHOW_PROGRESS) - file(DOWNLOAD "${ORTHANC_SDK_URL}/Plugins/Include/orthanc/OrthancCppDatabasePlugin.h" - "${AUTOGENERATED_DIR}/orthanc/OrthancCppDatabasePlugin.h" SHOW_PROGRESS) - if (${MSVC}) - add_definitions(-D_CRT_SECURE_NO_WARNINGS=1) - file(DOWNLOAD "${ORTHANC_SDK_URL}/Resources/ThirdParty/VisualStudio/stdint.h" - "${AUTOGENERATED_DIR}/stdint.h" SHOW_PROGRESS) + file(DOWNLOAD + "${ORTHANC_SDK_URL}/Plugins/Include/orthanc/OrthancCPlugin.h" + "${AUTOGENERATED_DIR}/orthanc/OrthancCPlugin.h" + STATUS StatusTmp) + + list(GET StatusTmp 0 Status) + if(NOT Status EQUAL 0) + message(FATAL_ERROR "Cannot download the plugin SDK") endif() + + file(DOWNLOAD + "${ORTHANC_SDK_URL}/Plugins/Include/orthanc/OrthancCDatabasePlugin.h" + "${AUTOGENERATED_DIR}/orthanc/OrthancCDatabasePlugin.h") + + file(DOWNLOAD + "${ORTHANC_SDK_URL}/Plugins/Include/orthanc/OrthancCppDatabasePlugin.h" + "${AUTOGENERATED_DIR}/orthanc/OrthancCppDatabasePlugin.h") else () CHECK_INCLUDE_FILE_CXX(orthanc/OrthancCppDatabasePlugin.h HAVE_ORTHANC_H) if (NOT HAVE_ORTHANC_H)