Mercurial > hg > orthanc-object-storage
changeset 38:9c0dfd10d5d0
statically link against libcrypto++
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 20 Jan 2021 12:35:23 +0100 |
parents | f55b2afdf53d |
children | 50d0be413c42 |
files | Aws/CMakeLists.txt Common/CryptoPPConfiguration.cmake Common/CryptoPPPackage.sh Common/Resources/DownloadOrthancFramework.cmake |
diffstat | 4 files changed, 314 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/Aws/CMakeLists.txt Wed Jan 06 18:27:54 2021 +0100 +++ b/Aws/CMakeLists.txt Wed Jan 20 12:35:23 2021 +0100 @@ -10,15 +10,17 @@ set(ORTHANC_FRAMEWORK_SOURCE "hg" CACHE STRING "orthanc source") set(ORTHANC_FRAMEWORK_VERSION "1.8.2" CACHE STRING "orthanc framework version") -set(USE_VCPKG_PACKAGES ON CACHE BOOL "Use vcpkg to link against crypto++ and AWS SDK") +set(USE_VCPKG_PACKAGES ON CACHE BOOL "Use Microsoft vcpkg to link against crypto++ and AWS SDK") set(STATIC_AWS_CLIENT ON CACHE BOOL "Statically link against AWS client library (only if USE_VCPKG_PACKAGES=OFF)") -set(ALLOW_DOWNLOADS ON) +set(USE_SYSTEM_CRYPTOPP ON CACHE BOOL "Use the system version of crypto++") # Download and setup the Orthanc framework +set(ALLOW_DOWNLOADS ON) include(${CMAKE_SOURCE_DIR}/../Common/Resources/DownloadOrthancFramework.cmake) include(${ORTHANC_FRAMEWORK_ROOT}/../Resources/CMake/OrthancFrameworkParameters.cmake) +set(ENABLE_WEB_CLIENT ON) # Access options related to curl set(ENABLE_GOOGLE_TEST ON) set(ORTHANC_FRAMEWORK_PLUGIN ON) set(ENABLE_MODULE_IMAGES OFF) @@ -43,29 +45,15 @@ ) -if (USE_VCPKG_PACKAGES) +if (NOT STATIC_BUILD AND USE_VCPKG_PACKAGES) + # Use vcpkg by Microsoft find_package(cryptopp CONFIG REQUIRED) find_package(AWSSDK REQUIRED COMPONENTS s3) include_directories(${WASTORAGE_INCLUDE_DIR}) set(CRYPTOPP_LIBRARIES cryptopp-static) else() - ## - ## Inclusion of system-wide crypto++ - ## - check_include_file_cxx(cryptopp/cryptlib.h HAVE_CRYPTOPP_H) - if (NOT HAVE_CRYPTOPP_H) - message(FATAL_ERROR "Please install the libcrypto++-dev package") - endif() - - include(CheckCXXSymbolExists) - set(CMAKE_REQUIRED_LIBRARIES cryptopp) - check_cxx_symbol_exists("CryptoPP::SHA1::InitState" cryptopp/sha.h HAVE_LIBCRYPTOPP) - if (NOT HAVE_LIBCRYPTOPP) - message(FATAL_ERROR "Unable to find the cryptopp library") - endif() - - set(CRYPTOPP_LIBRARIES cryptopp) - + include(${CMAKE_SOURCE_DIR}/../Common/CryptoPPConfiguration.cmake) + ## ## Building the C++ SDK for Amazon AWS ## WARNING: This is *not* compatible with Ninja (yet) @@ -75,11 +63,11 @@ else() set(Flags -DBUILD_SHARED_LIBS=ON) endif() - + include(ExternalProject) externalproject_add(AwsSdkCpp GIT_REPOSITORY https://github.com/aws/aws-sdk-cpp - GIT_TAG 1.8.42 + GIT_TAG 1.8.127 CMAKE_ARGS -DBUILD_ONLY=s3 #-DBUILD_ONLY=s3;transfer @@ -133,6 +121,7 @@ ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp ${ORTHANC_CORE_SOURCES} + ${CRYPTOPP_SOURCES} ) add_library(OrthancAwsS3Storage SHARED @@ -172,7 +161,7 @@ ) -if (NOT USE_VCPKG_PACKAGES) +if (STATIC_BUILD OR NOT USE_VCPKG_PACKAGES) add_dependencies(OrthancAwsS3Storage AwsSdkCpp) add_dependencies(UnitTests AwsSdkCpp) endif()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Common/CryptoPPConfiguration.cmake Wed Jan 20 12:35:23 2021 +0100 @@ -0,0 +1,254 @@ +# Cloud storage plugins for Orthanc +# Copyright (C) 2020-2021 Osimis S.A., Belgium +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU Affero General Public License +# as published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + + +if (STATIC_BUILD OR NOT USE_SYSTEM_CRYPTOPP) + # The .tar.gz package was created by "./CryptoPPPackage.sh" + SET(CRYPTOPP_SOURCES_DIR ${CMAKE_BINARY_DIR}/cryptopp-840) + SET(CRYPTOPP_URL "http://orthanc.osimis.io/ThirdPartyDownloads/cryptopp-840.tar.gz") + SET(CRYPTOPP_MD5 "d42363e8a12c06a000720335a4da70d3") + + DownloadPackage(${CRYPTOPP_MD5} ${CRYPTOPP_URL} "${CRYPTOPP_SOURCES_DIR}") + + include_directories( + ${CRYPTOPP_SOURCES_DIR} + ) + + # TODO - Consider adding SIMD support + add_definitions( + -DCRYPTOPP_DISABLE_ASM + ) + + set(CRYPTOPP_SOURCES + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/aria_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/bench1.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/bench2.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/bench3.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/blake2b_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/blake2s_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/chacha_avx.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/chacha_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/cham_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/crc_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/datatest.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/dlltest.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/fipsalgt.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/fipstest.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/gcm_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/gf2n_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/keccak_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/lea_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/neon_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/ppc_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/regtest1.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/regtest2.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/regtest3.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/regtest4.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/rijndael_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/sha_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/shacal2_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/simon128_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/sm4_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/speck128_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/sse_simd.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/test.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/validat0.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/validat1.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/validat10.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/validat2.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/validat3.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/validat4.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/validat5.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/validat6.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/validat7.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/validat8.cpp + # ${CRYPTOPP_SOURCES_DIR}/cryptopp/validat9.cpp + + ${CRYPTOPP_SOURCES_DIR}/cryptopp/3way.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/adler32.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/algebra.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/algparam.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/allocate.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/arc4.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/aria.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/ariatab.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/asn.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/authenc.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/base32.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/base64.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/basecode.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/bfinit.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/blake2.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/blowfish.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/blumshub.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/camellia.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/cast.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/casts.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/cbcmac.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/ccm.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/chacha.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/chachapoly.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/cham.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/channels.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/cmac.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/cpu.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/crc.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/cryptlib.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/darn.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/default.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/des.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/dessp.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/dh.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/dh2.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/dll.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/donna_32.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/donna_64.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/donna_sse.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/dsa.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/eax.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/ec2n.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/eccrypto.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/ecp.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/elgamal.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/emsa2.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/eprecomp.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/esign.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/files.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/filters.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/fips140.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/gcm.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/gf256.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/gf2_32.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/gf2n.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/gfpcrypt.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/gost.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/gzip.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/hc128.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/hc256.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/hex.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/hight.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/hmac.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/hrtimer.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/ida.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/idea.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/integer.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/iterhash.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/kalyna.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/kalynatab.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/keccak.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/keccak_core.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/lea.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/luc.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/mars.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/marss.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/md2.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/md4.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/md5.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/misc.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/modes.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/mqueue.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/mqv.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/nbtheory.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/oaep.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/osrng.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/padlkrng.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/panama.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/pch.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/pkcspad.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/poly1305.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/polynomi.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/ppc_power7.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/ppc_power8.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/ppc_power9.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/pssr.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/pubkey.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/queue.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/rabbit.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/rabin.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/randpool.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/rc2.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/rc5.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/rc6.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/rdrand.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/rdtables.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/rijndael.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/ripemd.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/rng.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/rsa.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/rw.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/safer.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/salsa.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/scrypt.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/seal.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/seed.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/serpent.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/sha.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/sha3.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/shacal2.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/shake.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/shark.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/sharkbox.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/simeck.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/simon.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/simple.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/skipjack.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/sm3.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/sm4.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/sosemanuk.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/speck.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/square.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/squaretb.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/strciphr.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/tea.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/tftables.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/threefish.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/tiger.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/tigertab.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/ttmac.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/tweetnacl.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/twofish.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/vmac.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/wake.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/whrlpool.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/xed25519.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/xtr.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/xtrcrypt.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/xts.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/zdeflate.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/zinflate.cpp + ${CRYPTOPP_SOURCES_DIR}/cryptopp/zlib.cpp + ) + + source_group(ThirdParty\\cryptopp REGULAR_EXPRESSION ${CRYPTOPP_SOURCES_DIR}/.*) + +else() + ## + ## Inclusion of system-wide crypto++ + ## + check_include_file_cxx(cryptopp/cryptlib.h HAVE_CRYPTOPP_H) + if (NOT HAVE_CRYPTOPP_H) + message(FATAL_ERROR "Please install the libcrypto++-dev package") + endif() + + include(CheckCXXSymbolExists) + set(CMAKE_REQUIRED_LIBRARIES cryptopp) + check_cxx_symbol_exists("CryptoPP::SHA1::InitState" cryptopp/sha.h HAVE_LIBCRYPTOPP) + if (NOT HAVE_LIBCRYPTOPP) + message(FATAL_ERROR "Unable to find the cryptopp library") + endif() + + set(CRYPTOPP_LIBRARIES cryptopp) +endif()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Common/CryptoPPPackage.sh Wed Jan 20 12:35:23 2021 +0100 @@ -0,0 +1,20 @@ +#!/bin/bash + +set -ex + +VERSION=840 + +TARGET=/tmp/cryptopp-${VERSION} +rm -rf ${TARGET} +mkdir -p ${TARGET}/cryptopp +cd ${TARGET}/cryptopp +wget https://www.cryptopp.com/cryptopp${VERSION}.zip +unzip ./cryptopp${VERSION}.zip +rm ./cryptopp${VERSION}.zip +rm -rf ./TestData +rm -rf ./TestPrograms +rm -rf ./TestVectors +cd /tmp +tar cvfz cryptopp-${VERSION}.tar.gz cryptopp-${VERSION} + +md5sum /tmp/cryptopp-${VERSION}.tar.gz
--- a/Common/Resources/DownloadOrthancFramework.cmake Wed Jan 06 18:27:54 2021 +0100 +++ b/Common/Resources/DownloadOrthancFramework.cmake Wed Jan 20 12:35:23 2021 +0100 @@ -1,7 +1,7 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2020-2021 Osimis S.A., Belgium +# Copyright (C) 2017-2021 Osimis S.A., Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License @@ -114,6 +114,14 @@ set(ORTHANC_FRAMEWORK_MD5 "328f94dcbd78c169655a13f7ad58a2c2") elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.7.3") set(ORTHANC_FRAMEWORK_MD5 "3f1ba9502ec7c5449971d3b56087bcde") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.7.4") + set(ORTHANC_FRAMEWORK_MD5 "19fcb7c21876af86546baa048a22c6c0") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.8.0") + set(ORTHANC_FRAMEWORK_MD5 "f8ec7554ef5d23ea4ce474b1e8214de9") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.8.1") + set(ORTHANC_FRAMEWORK_MD5 "db094f96399cbe8b9bbdbce34884c220") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.8.2") + set(ORTHANC_FRAMEWORK_MD5 "8bfa10e66c9931e74111be0bfb1f4548") # Below this point are development snapshots that were used to # release some plugin, before an official release of the Orthanc @@ -125,6 +133,15 @@ elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "ae0e3fd609df") # DICOMweb 1.1 (framework pre-1.6.0) set(ORTHANC_FRAMEWORK_MD5 "7e09e9b530a2f527854f0b782d7e0645") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "82652c5fc04f") + # Stone Web viewer 1.0 (framework pre-1.8.1) + set(ORTHANC_FRAMEWORK_MD5 "d77331d68917e66a3f4f9b807bbdab7f") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "4a3ba4bf4ba7") + # PostgreSQL 3.3 (framework pre-1.8.2) + set(ORTHANC_FRAMEWORK_MD5 "2d82bddf06f9cfe82095495cb3b8abde") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "23ad1b9c7800") + # For "Toolbox::ReadJson()" and "Toolbox::Write{...}Json()" (pre-1.9.0) + set(ORTHANC_FRAMEWORK_MD5 "9af92080e57c60dd288eba46ce606c00") endif() endif() endif() @@ -520,6 +537,16 @@ include_directories(${DCMTK_INCLUDE_DIRS}) link_libraries(${DCMTK_LIBRARIES}) endif() + + # Optional component - OpenSSL + if (ENABLE_SSL) + include(FindOpenSSL) + if (NOT ${OPENSSL_FOUND}) + message(FATAL_ERROR "Unable to find OpenSSL") + endif() + include_directories(${OPENSSL_INCLUDE_DIR}) + link_libraries(${OPENSSL_LIBRARIES}) + endif() endif() # Look for Orthanc framework shared library