changeset 3688:9c091747483a

Enable support of compression in civetweb
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 25 Feb 2020 10:51:26 +0100
parents e6d6f8d23d02
children e85bfba2d307
files Resources/CMake/CivetwebConfiguration.cmake UnitTestsSources/VersionsTests.cpp
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CMake/CivetwebConfiguration.cmake	Tue Feb 25 08:42:00 2020 +0100
+++ b/Resources/CMake/CivetwebConfiguration.cmake	Tue Feb 25 10:51:26 2020 +0100
@@ -30,6 +30,12 @@
     ${CIVETWEB_SOURCES_DIR}/src/civetweb.c
     )
 
+  # New in Orthanc 1.6.0: Enable support of compression in civetweb
+  set_source_files_properties(
+    ${CIVETWEB_SOURCES}
+    PROPERTIES COMPILE_DEFINITIONS
+    "USE_ZLIB=1")
+  
   if (ENABLE_SSL)
     add_definitions(
       -DNO_SSL_DL=1
--- a/UnitTestsSources/VersionsTests.cpp	Tue Feb 25 08:42:00 2020 +0100
+++ b/UnitTestsSources/VersionsTests.cpp	Tue Feb 25 10:51:26 2020 +0100
@@ -113,6 +113,14 @@
 }
 
 
+#if ORTHANC_ENABLE_CIVETWEB == 1
+TEST(Version, CivetwebCompression)
+{
+  ASSERT_TRUE(mg_check_feature(MG_FEATURES_COMPRESSION));
+}
+#endif
+
+
 #if ORTHANC_STATIC == 1
 
 TEST(Versions, ZlibStatic)