# HG changeset patch # User Sebastien Jodogne # Date 1779088519 -7200 # Node ID 7872e2d293bbd65434eebf9d6823e155b0157887 # Parent 2ec15c5ef4bded7bd204e93faf904840fcd7c688 fix build if targeting webassembly diff -r 2ec15c5ef4bd -r 7872e2d293bb OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake --- 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 diff -r 2ec15c5ef4bd -r 7872e2d293bb OrthancFramework/Sources/DataSource/DataSourceAnswer.h --- 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" diff -r 2ec15c5ef4bd -r 7872e2d293bb OrthancFramework/Sources/DataSource/DataSourceMemoryBudget.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 diff -r 2ec15c5ef4bd -r 7872e2d293bb OrthancFramework/Sources/DataSource/DicomDataSource.h --- 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 -#include namespace Orthanc @@ -66,7 +66,7 @@ class Dicom : public boost::noncopyable { private: - boost::mutex mutex_; + Mutex mutex_; boost::shared_ptr 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) :