Mercurial > hg > orthanc-object-storage
changeset 159:99c14487f96b
fix mingw compilation
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sun, 23 Jun 2024 10:30:48 +0200 |
parents | 4a8bedae63b1 |
children | d3e7c86c3a4e |
files | Aws/AwsStaticConfiguration.cmake Common/StoragePlugin.cpp |
diffstat | 2 files changed, 18 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Aws/AwsStaticConfiguration.cmake Sat Jun 22 19:40:07 2024 +0200 +++ b/Aws/AwsStaticConfiguration.cmake Sun Jun 23 10:30:48 2024 +0200 @@ -234,7 +234,7 @@ -DINTEL_NO_ITTNOTIFY_API=1 ) -if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") list(APPEND AWS_SOURCES_SUBDIRS ${AWS_C_COMMON_SOURCES_DIR}/source/windows/ ${AWS_C_IO_SOURCES_DIR}/source/windows/ @@ -284,13 +284,22 @@ ) -if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + # WARNING: "//" *are* important below (don't replace them with "/") + if (MINGW) + list(REMOVE_ITEM AWS_SOURCES + ${AWS_C_COMMON_SOURCES_DIR}/source/windows//system_info.c + ) + list(APPEND AWS_SOURCES + ${AWS_C_COMMON_SOURCES_DIR}/source/posix/system_info.c + ) + endif() + list(APPEND AWS_SOURCES ${AWS_C_COMMON_SOURCES_DIR}/source/platform_fallback_stubs/system_info.c ) list(REMOVE_ITEM AWS_SOURCES - # WARNING: "//" *is* important (don't replace it with "/") ${AWS_C_IO_SOURCES_DIR}/source/windows//secure_channel_tls_handler.c ) endif()
--- a/Common/StoragePlugin.cpp Sat Jun 22 19:40:07 2024 +0200 +++ b/Common/StoragePlugin.cpp Sun Jun 23 10:30:48 2024 +0200 @@ -50,6 +50,12 @@ #include "StoragePlugin.h" #include <Toolbox.h> +#ifdef _WIN32 +// This is a hotfix for: https://orthanc.uclouvain.be/hg/orthanc/rev/e4d9a872998f +# undef ORTHANC_PLUGINS_API +# define ORTHANC_PLUGINS_API __declspec(dllexport) +#endif + static std::unique_ptr<IStorage> primaryStorage; static std::unique_ptr<IStorage> secondaryStorage;