Mercurial > hg > orthanc
annotate OrthancFramework/Resources/CMake/CivetwebConfiguration.cmake @ 5587:0f5586c498d1 find-refactoring
removed FindRequest::FilterConstraint as it was mostly redundant with DicomTagConstraint
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 03 May 2024 17:06:42 +0200 |
parents | 48b8dae6dc77 |
children | f7adfb22e20e |
rev | line source |
---|---|
4120
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
1 # Orthanc - A Lightweight, RESTful DICOM Store |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
3 # Department, University Hospital of Liege, Belgium |
5485
48b8dae6dc77
upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5434
diff
changeset
|
4 # Copyright (C) 2017-2024 Osimis S.A., Belgium |
48b8dae6dc77
upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5434
diff
changeset
|
5 # Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
4120
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
6 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
7 # This program is free software: you can redistribute it and/or |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
8 # modify it under the terms of the GNU Lesser General Public License |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
9 # as published by the Free Software Foundation, either version 3 of |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
10 # the License, or (at your option) any later version. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
11 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
12 # This program is distributed in the hope that it will be useful, but |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
13 # WITHOUT ANY WARRANTY; without even the implied warranty of |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
15 # Lesser General Public License for more details. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
16 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
17 # You should have received a copy of the GNU Lesser General Public |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
18 # License along with this program. If not, see |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
19 # <http://www.gnu.org/licenses/>. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
20 |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4109
diff
changeset
|
21 |
2377
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 if (STATIC_BUILD OR NOT USE_SYSTEM_CIVETWEB) |
3807
2f28c7eb2776
fix civetweb 1.12 archive
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3804
diff
changeset
|
23 |
4616
57b1a36645ae
upgrade to civetweb 1.14
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
24 ## WARNING: "civetweb-1.14.tar.gz" comes with a subfolder |
57b1a36645ae
upgrade to civetweb 1.14
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
25 ## "civetweb-1.14/test/nonlatin" that cannot be removed by "hg purge |
3807
2f28c7eb2776
fix civetweb 1.12 archive
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3804
diff
changeset
|
26 ## --all" on Windows hosts. We thus created a custom |
4616
57b1a36645ae
upgrade to civetweb 1.14
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
27 ## "civetweb-1.14-fixed.tar.gz" as follows: |
3807
2f28c7eb2776
fix civetweb 1.12 archive
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3804
diff
changeset
|
28 ## |
2f28c7eb2776
fix civetweb 1.12 archive
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3804
diff
changeset
|
29 ## $ cd /tmp |
5434
aa1c09fa6632
changed location of third-party downloads
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5271
diff
changeset
|
30 ## $ wget https://orthanc.uclouvain.be/downloads/third-party-downloads/civetweb-1.14.tar.gz |
4616
57b1a36645ae
upgrade to civetweb 1.14
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
31 ## $ tar xvf civetweb-1.14.tar.gz |
57b1a36645ae
upgrade to civetweb 1.14
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
32 ## $ rm -rf civetweb-1.14/src/third_party/ civetweb-1.14/test/ |
57b1a36645ae
upgrade to civetweb 1.14
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
33 ## $ tar cvfz civetweb-1.14-fixed.tar.gz civetweb-1.14 |
3807
2f28c7eb2776
fix civetweb 1.12 archive
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3804
diff
changeset
|
34 ## |
2f28c7eb2776
fix civetweb 1.12 archive
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3804
diff
changeset
|
35 |
4616
57b1a36645ae
upgrade to civetweb 1.14
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
36 set(CIVETWEB_SOURCES_DIR ${CMAKE_BINARY_DIR}/civetweb-1.14) |
5434
aa1c09fa6632
changed location of third-party downloads
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5271
diff
changeset
|
37 set(CIVETWEB_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/civetweb-1.14-fixed.tar.gz") |
4616
57b1a36645ae
upgrade to civetweb 1.14
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
38 set(CIVETWEB_MD5 "1f25d516b7a4e65d8b270d1cc399e0a9") |
2377
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 |
3128
972cc98959a3
fix build of civetweb for Visual Studio 2008 and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3068
diff
changeset
|
40 if (IS_DIRECTORY "${CIVETWEB_SOURCES_DIR}") |
972cc98959a3
fix build of civetweb for Visual Studio 2008 and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3068
diff
changeset
|
41 set(FirstRun OFF) |
972cc98959a3
fix build of civetweb for Visual Studio 2008 and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3068
diff
changeset
|
42 else() |
972cc98959a3
fix build of civetweb for Visual Studio 2008 and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3068
diff
changeset
|
43 set(FirstRun ON) |
972cc98959a3
fix build of civetweb for Visual Studio 2008 and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3068
diff
changeset
|
44 endif() |
972cc98959a3
fix build of civetweb for Visual Studio 2008 and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3068
diff
changeset
|
45 |
2377
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 DownloadPackage(${CIVETWEB_MD5} ${CIVETWEB_URL} "${CIVETWEB_SOURCES_DIR}") |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 |
4701
68635d365a27
patch for compatibility of civetweb 1.14 with openssl 3.0.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4616
diff
changeset
|
48 execute_process( |
68635d365a27
patch for compatibility of civetweb 1.14 with openssl 3.0.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4616
diff
changeset
|
49 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i |
68635d365a27
patch for compatibility of civetweb 1.14 with openssl 3.0.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4616
diff
changeset
|
50 ${CMAKE_CURRENT_LIST_DIR}/../Patches/civetweb-1.14.patch |
68635d365a27
patch for compatibility of civetweb 1.14 with openssl 3.0.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4616
diff
changeset
|
51 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
68635d365a27
patch for compatibility of civetweb 1.14 with openssl 3.0.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4616
diff
changeset
|
52 RESULT_VARIABLE Failure |
68635d365a27
patch for compatibility of civetweb 1.14 with openssl 3.0.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4616
diff
changeset
|
53 ) |
68635d365a27
patch for compatibility of civetweb 1.14 with openssl 3.0.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4616
diff
changeset
|
54 |
68635d365a27
patch for compatibility of civetweb 1.14 with openssl 3.0.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4616
diff
changeset
|
55 if (FirstRun AND Failure) |
68635d365a27
patch for compatibility of civetweb 1.14 with openssl 3.0.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4616
diff
changeset
|
56 message(FATAL_ERROR "Error while patching a file") |
68635d365a27
patch for compatibility of civetweb 1.14 with openssl 3.0.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4616
diff
changeset
|
57 endif() |
68635d365a27
patch for compatibility of civetweb 1.14 with openssl 3.0.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4616
diff
changeset
|
58 |
2377
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 include_directories( |
2378 | 60 ${CIVETWEB_SOURCES_DIR}/include |
2377
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 ) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 set(CIVETWEB_SOURCES |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
64 ${CIVETWEB_SOURCES_DIR}/src/civetweb.c |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 ) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 |
3688
9c091747483a
Enable support of compression in civetweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3178
diff
changeset
|
67 # New in Orthanc 1.6.0: Enable support of compression in civetweb |
4259
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
68 set(tmp "USE_ZLIB=1") |
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
69 |
2377
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 if (ENABLE_SSL) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 add_definitions( |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 -DNO_SSL_DL=1 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 ) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
75 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD") |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 link_libraries(dl) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 endif() |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 |
4259
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
79 if (CIVETWEB_OPENSSL_API STREQUAL "1.0") |
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
80 set(tmp "${tmp};OPENSSL_API_1_0=1") |
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
81 elseif (CIVETWEB_OPENSSL_API STREQUAL "1.1") |
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
82 set(tmp "${tmp};OPENSSL_API_1_1=1") |
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
83 else() |
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
84 message(FATAL_ERROR "Unsupported value for CIVETWEB_OPENSSL_API: ${CIVETWEB_OPENSSL_API}") |
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
85 endif() |
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
86 |
2377
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
87 else() |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
88 add_definitions( |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
89 -DNO_SSL=1 # Remove SSL support from civetweb |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
90 ) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 endif() |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
92 |
4259
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
93 set_source_files_properties( |
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
94 ${CIVETWEB_SOURCES} |
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
95 PROPERTIES COMPILE_DEFINITIONS "${tmp}" |
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
96 ) |
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
97 |
2377
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 source_group(ThirdParty\\Civetweb REGULAR_EXPRESSION ${CIVETWEB_SOURCES_DIR}/.*) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 |
3178
6d558598d713
Fix build with unpatched versions of Civetweb (missing "mg_disable_keep_alive()")
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
100 add_definitions( |
6d558598d713
Fix build with unpatched versions of Civetweb (missing "mg_disable_keep_alive()")
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
101 -DCIVETWEB_HAS_DISABLE_KEEP_ALIVE=1 |
4228
c8c0bbaaace3
write access to webdav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4210
diff
changeset
|
102 -DCIVETWEB_HAS_WEBDAV_WRITING=1 |
3178
6d558598d713
Fix build with unpatched versions of Civetweb (missing "mg_disable_keep_alive()")
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
103 ) |
6d558598d713
Fix build with unpatched versions of Civetweb (missing "mg_disable_keep_alive()")
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
104 |
2377
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
105 else() |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
106 CHECK_INCLUDE_FILE_CXX(civetweb.h HAVE_CIVETWEB_H) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
107 if (NOT HAVE_CIVETWEB_H) |
4210
7b14ddf795c5
auto-detection of mg_disable_keep_alive() in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4120
diff
changeset
|
108 message(FATAL_ERROR "Please install the libcivetweb-dev package") |
2377
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
109 endif() |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
110 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
111 cmake_reset_check_state() |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
112 set(CMAKE_REQUIRED_LIBRARIES dl pthread) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
113 CHECK_LIBRARY_EXISTS(civetweb mg_start "" HAVE_CIVETWEB_LIB) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 if (NOT HAVE_CIVETWEB_LIB) |
4210
7b14ddf795c5
auto-detection of mg_disable_keep_alive() in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4120
diff
changeset
|
115 message(FATAL_ERROR "Please install the libcivetweb-dev package") |
2377
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
116 endif() |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
117 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
118 link_libraries(civetweb) |
3178
6d558598d713
Fix build with unpatched versions of Civetweb (missing "mg_disable_keep_alive()")
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
119 |
4210
7b14ddf795c5
auto-detection of mg_disable_keep_alive() in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4120
diff
changeset
|
120 # Check whether the system distribution of civetweb contains the |
4259
5227df2a650f
upgrade to civetweb 1.13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4228
diff
changeset
|
121 # patch "../Patches/civetweb-1.13.patch" that allows to disable |
4210
7b14ddf795c5
auto-detection of mg_disable_keep_alive() in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4120
diff
changeset
|
122 # keep-alive on selected HTTP connections. This is useful to speed |
7b14ddf795c5
auto-detection of mg_disable_keep_alive() in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4120
diff
changeset
|
123 # up multipart transfers, as encountered in DICOMweb. |
4616
57b1a36645ae
upgrade to civetweb 1.14
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
124 CHECK_LIBRARY_EXISTS(civetweb mg_disable_keep_alive "" CIVETWEB_HAS_DISABLE_KEEP_ALIVE_1) # From "../Patches/civetweb-1.13.patch" |
57b1a36645ae
upgrade to civetweb 1.14
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
125 CHECK_LIBRARY_EXISTS(civetweb mg_disable_connection_keep_alive "" CIVETWEB_HAS_DISABLE_KEEP_ALIVE_2) # From civetweb >= 1.14 |
57b1a36645ae
upgrade to civetweb 1.14
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
126 if (CIVETWEB_HAS_DISABLE_KEEP_ALIVE_1 OR |
57b1a36645ae
upgrade to civetweb 1.14
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
127 CIVETWEB_HAS_DISABLE_KEEP_ALIVE_2) |
4228
c8c0bbaaace3
write access to webdav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4210
diff
changeset
|
128 add_definitions( |
c8c0bbaaace3
write access to webdav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4210
diff
changeset
|
129 -DCIVETWEB_HAS_DISABLE_KEEP_ALIVE=1 |
c8c0bbaaace3
write access to webdav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4210
diff
changeset
|
130 -DCIVETWEB_HAS_WEBDAV_WRITING=1 |
c8c0bbaaace3
write access to webdav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4210
diff
changeset
|
131 ) |
4210
7b14ddf795c5
auto-detection of mg_disable_keep_alive() in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4120
diff
changeset
|
132 message("Performance: Your system-wide distribution of civetweb is configured for best performance") |
7b14ddf795c5
auto-detection of mg_disable_keep_alive() in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4120
diff
changeset
|
133 else() |
4228
c8c0bbaaace3
write access to webdav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4210
diff
changeset
|
134 message(WARNING "Performance: Your system-wide distribution of civetweb does not feature the mg_disable_keep_alive() function, and WebDAV will only be available for read-only access") |
c8c0bbaaace3
write access to webdav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4210
diff
changeset
|
135 add_definitions( |
c8c0bbaaace3
write access to webdav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4210
diff
changeset
|
136 -DCIVETWEB_HAS_DISABLE_KEEP_ALIVE=0 |
c8c0bbaaace3
write access to webdav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4210
diff
changeset
|
137 -DCIVETWEB_HAS_WEBDAV_WRITING=0 |
c8c0bbaaace3
write access to webdav
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4210
diff
changeset
|
138 ) |
4210
7b14ddf795c5
auto-detection of mg_disable_keep_alive() in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4120
diff
changeset
|
139 endif() |
4616
57b1a36645ae
upgrade to civetweb 1.14
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
140 |
57b1a36645ae
upgrade to civetweb 1.14
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
141 unset(CMAKE_REQUIRED_LIBRARIES) # This reset must be after "CHECK_LIBRARY_EXISTS" |
2377
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
142 endif() |