# HG changeset patch # User Sebastien Jodogne # Date 1660640785 -7200 # Node ID 859f3668c1811ed0b63929e6c8941c437fdf52f9 # Parent b23a4bb18065ceb0e9a4137982f1b5d3e95a7a89 replaced macro "#warning" by "#pragma message" for Visual Studio diff -r b23a4bb18065 -r 859f3668c181 OrthancFramework/SharedLibrary/CMakeLists.txt --- a/OrthancFramework/SharedLibrary/CMakeLists.txt Mon Aug 15 22:13:39 2022 +0200 +++ b/OrthancFramework/SharedLibrary/CMakeLists.txt Tue Aug 16 11:06:25 2022 +0200 @@ -508,6 +508,14 @@ ) endif() + if (STATIC_BUILD OR NOT USE_SYSTEM_DCMTK) + list(APPEND Flags + # This is necessary to compile "dcmtk/dcmdata/dctagkey.h" because of + # macro "DCMTK_DIAGNOSTIC_IGNORE_ATTRIBUTE_REDECLARATION" + -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=${DCMTK_SOURCES_DIR}/ofstd/include + ) + endif() + # Build the unit tests, linking them against the just-created # "OrthancFramework" library externalproject_add(UnitTests diff -r b23a4bb18065 -r 859f3668c181 OrthancFramework/Sources/HttpServer/HttpServer.cpp --- a/OrthancFramework/Sources/HttpServer/HttpServer.cpp Mon Aug 15 22:13:39 2022 +0200 +++ b/OrthancFramework/Sources/HttpServer/HttpServer.cpp Tue Aug 16 11:06:25 2022 +0200 @@ -75,7 +75,11 @@ # include # if OPENSSL_VERSION_NUMBER < 0x30000000L -# warning You are linking Orthanc against OpenSSL 1.x, whose license is incompatible with the GPLv3+ used by Orthanc >= 1.10.0. Please update to OpenSSL 3.x, that uses the Apache 2 license. +# if defined(_MSC_VER) +# pragma message("You are linking Orthanc against OpenSSL 1.x, whose license is incompatible with the GPLv3+ used by Orthanc >= 1.10.0. Please update to OpenSSL 3.x, that uses the Apache 2 license.") +# else +# warning You are linking Orthanc against OpenSSL 1.x, whose license is incompatible with the GPLv3+ used by Orthanc >= 1.10.0. Please update to OpenSSL 3.x, that uses the Apache 2 license. +# endif # endif #endif diff -r b23a4bb18065 -r 859f3668c181 OrthancFramework/Sources/Pkcs11.cpp --- a/OrthancFramework/Sources/Pkcs11.cpp Mon Aug 15 22:13:39 2022 +0200 +++ b/OrthancFramework/Sources/Pkcs11.cpp Tue Aug 16 11:06:25 2022 +0200 @@ -43,7 +43,11 @@ #include #if OPENSSL_VERSION_NUMBER < 0x30000000L -# warning You are linking Orthanc against OpenSSL 1.x, whose license is incompatible with the GPLv3+ used by Orthanc. Please update to OpenSSL 3.x, that uses the Apache 2 license. +# if defined(_MSC_VER) +# pragma message("You are linking Orthanc against OpenSSL 1.x, whose license is incompatible with the GPLv3+ used by Orthanc. Please update to OpenSSL 3.x, that uses the Apache 2 license.") +# else +# warning You are linking Orthanc against OpenSSL 1.x, whose license is incompatible with the GPLv3+ used by Orthanc. Please update to OpenSSL 3.x, that uses the Apache 2 license. +# endif #endif diff -r b23a4bb18065 -r 859f3668c181 OrthancFramework/Sources/Toolbox.cpp --- a/OrthancFramework/Sources/Toolbox.cpp Mon Aug 15 22:13:39 2022 +0200 +++ b/OrthancFramework/Sources/Toolbox.cpp Tue Aug 16 11:06:25 2022 +0200 @@ -96,7 +96,11 @@ # include # if OPENSSL_VERSION_NUMBER < 0x30000000L -# warning You are linking Orthanc against OpenSSL 1.x, whose license is incompatible with the GPLv3+ used by Orthanc >= 1.10.0. Please update to OpenSSL 3.x, that uses the Apache 2 license. +# if defined(_MSC_VER) +# pragma message("You are linking Orthanc against OpenSSL 1.x, whose license is incompatible with the GPLv3+ used by Orthanc >= 1.10.0. Please update to OpenSSL 3.x, that uses the Apache 2 license.") +# else +# warning You are linking Orthanc against OpenSSL 1.x, whose license is incompatible with the GPLv3+ used by Orthanc >= 1.10.0. Please update to OpenSSL 3.x, that uses the Apache 2 license. +# endif # endif #endif