Mercurial > hg > orthanc
changeset 6795:7872e2d293bb
fix build if targeting webassembly
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Mon, 18 May 2026 09:15:19 +0200 |
| parents | 2ec15c5ef4bd |
| children | e2241b1bcac8 4b1c0418a4ef |
| files | OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake OrthancFramework/Sources/DataSource/DataSourceAnswer.h OrthancFramework/Sources/DataSource/DataSourceMemoryBudget.h OrthancFramework/Sources/DataSource/DicomDataSource.h |
| diffstat | 4 files changed, 18 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake Sun May 17 19:22:11 2026 +0200 +++ b/OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake Mon May 18 09:15:19 2026 +0200 @@ -549,7 +549,6 @@ endif() set(ORTHANC_DICOM_SOURCES_INTERNAL - ${CMAKE_CURRENT_LIST_DIR}/../../Sources/DataSource/DicomDataSource.cpp ${CMAKE_CURRENT_LIST_DIR}/../../Sources/DicomNetworking/DicomFindAnswers.cpp ${CMAKE_CURRENT_LIST_DIR}/../../Sources/DicomParsing/DicomModification.cpp ${CMAKE_CURRENT_LIST_DIR}/../../Sources/DicomParsing/DicomWebJsonVisitor.cpp @@ -678,6 +677,12 @@ ${CMAKE_CURRENT_LIST_DIR}/../../Sources/TemporaryFile.cpp ) + if (ENABLE_DCMTK) + list(APPEND ORTHANC_CORE_SOURCES_INTERNAL + ${CMAKE_CURRENT_LIST_DIR}/../../Sources/DataSource/DicomDataSource.cpp + ) + endif() + if (ENABLE_MODULE_JOBS) list(APPEND ORTHANC_CORE_SOURCES_INTERNAL ${CMAKE_CURRENT_LIST_DIR}/../../Sources/JobsEngine/JobsEngine.cpp
--- a/OrthancFramework/Sources/DataSource/DataSourceAnswer.h Sun May 17 19:22:11 2026 +0200 +++ b/OrthancFramework/Sources/DataSource/DataSourceAnswer.h Mon May 18 09:15:19 2026 +0200 @@ -24,6 +24,10 @@ #pragma once +#if defined(__EMSCRIPTEN__) +# error This file is currently not available if targeting WebAssembly +#endif + #include "../Compatibility.h" #include "../IDynamicObject.h" #include "IDataIdentifier.h"
--- a/OrthancFramework/Sources/DataSource/DataSourceMemoryBudget.h Sun May 17 19:22:11 2026 +0200 +++ b/OrthancFramework/Sources/DataSource/DataSourceMemoryBudget.h Mon May 18 09:15:19 2026 +0200 @@ -24,6 +24,10 @@ #pragma once +#if defined(__EMSCRIPTEN__) +# error This file is currently not available if targeting WebAssembly +#endif + #include "../Compatibility.h" #include <boost/noncopyable.hpp>
--- a/OrthancFramework/Sources/DataSource/DicomDataSource.h Sun May 17 19:22:11 2026 +0200 +++ b/OrthancFramework/Sources/DataSource/DicomDataSource.h Mon May 18 09:15:19 2026 +0200 @@ -34,11 +34,11 @@ #include "../Compatibility.h" #include "../FileStorage/FileInfo.h" +#include "../MultiThreading/Mutex.h" #include "IDataIdentifier.h" #include "IDataSource.h" #include <boost/shared_ptr.hpp> -#include <boost/thread/mutex.hpp> namespace Orthanc @@ -66,7 +66,7 @@ class Dicom : public boost::noncopyable { private: - boost::mutex mutex_; + Mutex mutex_; boost::shared_ptr<IDynamicObject> value_; public: @@ -80,8 +80,8 @@ class Lock : public boost::noncopyable { private: - Dicom& that_; - boost::mutex::scoped_lock lock_; + Dicom& that_; + Mutex::ScopedLock lock_; public: explicit Lock(Dicom& that) :
