Mercurial > hg > orthanc-databases
changeset 284:64bf8914f02e
sync + no more need of "-DORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES" to dynamically link against system-wide orthanc framework
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 12 Jun 2021 08:49:52 +0200 |
parents | e7678a7b10bb |
children | f2e160b2dc3e |
files | MySQL/CMakeLists.txt PostgreSQL/CMakeLists.txt Resources/CMake/DatabasesFrameworkConfiguration.cmake Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp SQLite/CMakeLists.txt |
diffstat | 6 files changed, 32 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/MySQL/CMakeLists.txt Fri Apr 23 10:02:00 2021 +0200 +++ b/MySQL/CMakeLists.txt Sat Jun 12 08:49:52 2021 +0200 @@ -11,7 +11,7 @@ set(ORTHANC_FRAMEWORK_VERSION "mainline") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") else() - set(ORTHANC_FRAMEWORK_VERSION "1.9.2") + set(ORTHANC_FRAMEWORK_VERSION "1.9.3") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") endif()
--- a/PostgreSQL/CMakeLists.txt Fri Apr 23 10:02:00 2021 +0200 +++ b/PostgreSQL/CMakeLists.txt Sat Jun 12 08:49:52 2021 +0200 @@ -11,7 +11,7 @@ set(ORTHANC_FRAMEWORK_VERSION "mainline") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") else() - set(ORTHANC_FRAMEWORK_VERSION "1.9.2") + set(ORTHANC_FRAMEWORK_VERSION "1.9.3") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") endif()
--- a/Resources/CMake/DatabasesFrameworkConfiguration.cmake Fri Apr 23 10:02:00 2021 +0200 +++ b/Resources/CMake/DatabasesFrameworkConfiguration.cmake Sat Jun 12 08:49:52 2021 +0200 @@ -55,6 +55,17 @@ include_directories(${ORTHANC_FRAMEWORK_ROOT}) if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") + if (ORTHANC_FRAMEWORK_USE_SHARED) + include(FindBoost) + find_package(Boost COMPONENTS regex thread) + + if (NOT Boost_FOUND) + message(FATAL_ERROR "Unable to locate Boost on this system") + endif() + + link_libraries(${Boost_LIBRARIES} jsoncpp) + endif() + link_libraries(${ORTHANC_FRAMEWORK_LIBRARIES}) if (ENABLE_SQLITE_BACKEND)
--- a/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Fri Apr 23 10:02:00 2021 +0200 +++ b/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Sat Jun 12 08:49:52 2021 +0200 @@ -128,6 +128,8 @@ set(ORTHANC_FRAMEWORK_MD5 "08eebc66ef93c3b40115c38501db5fbd") elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.9.2") set(ORTHANC_FRAMEWORK_MD5 "3ea66c09f64aca990016683b6375734e") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.9.3") + set(ORTHANC_FRAMEWORK_MD5 "9b86e6f00e03278293cd15643cc0233f") # Below this point are development snapshots that were used to # release some plugin, before an official release of the Orthanc
--- a/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp Fri Apr 23 10:02:00 2021 +0200 +++ b/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp Sat Jun 12 08:49:52 2021 +0200 @@ -2726,10 +2726,18 @@ delete *it; } + size_ = 0; content_.clear(); } - void Flatten(std::string& target) const + /** + * Since Orthanc 1.9.3, this function also clears the content of + * the ChunkedBuffer in order to mimic the behavior of the + * original class "Orthanc::ChunkedBuffer". This prevents the + * forgetting of calling "Clear()" in order to reduce memory + * consumption. + **/ + void Flatten(std::string& target) { target.resize(size_); @@ -2745,10 +2753,14 @@ memcpy(&target[pos], (*it)->c_str(), s); pos += s; } + + delete *it; } - assert(size_ == 0 || - pos == target.size()); + assert(pos == target.size()); + + size_ = 0; + content_.clear(); } void AddChunk(const void* data, @@ -2779,7 +2791,7 @@ return headers_; } - const ChunkedBuffer& GetBody() const + ChunkedBuffer& GetBody() { return body_; }
--- a/SQLite/CMakeLists.txt Fri Apr 23 10:02:00 2021 +0200 +++ b/SQLite/CMakeLists.txt Sat Jun 12 08:49:52 2021 +0200 @@ -11,7 +11,7 @@ set(ORTHANC_FRAMEWORK_VERSION "mainline") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") else() - set(ORTHANC_FRAMEWORK_VERSION "1.8.1") + set(ORTHANC_FRAMEWORK_VERSION "1.9.3") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") endif()