Mercurial > hg > orthanc
annotate Resources/CMake/CivetwebConfiguration.cmake @ 2821:13adab9220b5
fix osimis address
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 17 Sep 2018 11:37:05 +0200 |
parents | ade8b4ddd8a6 |
children | ad37c21ec4db |
rev | line source |
---|---|
2377
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 if (STATIC_BUILD OR NOT USE_SYSTEM_CIVETWEB) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 set(CIVETWEB_SOURCES_DIR ${CMAKE_BINARY_DIR}/civetweb-1.9.1) |
2384 | 3 set(CIVETWEB_URL "http://www.orthanc-server.com/downloads/third-party/civetweb-1.9.1.tar.gz") |
2377
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 set(CIVETWEB_MD5 "c713f7336582d1a78897971260c67c2a") |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 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
|
7 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 include_directories( |
2378 | 9 ${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
|
10 ) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 set(CIVETWEB_SOURCES |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 ${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
|
14 ) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 if (ENABLE_SSL) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 add_definitions( |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 -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
|
20 ) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 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
|
22 ${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
|
23 link_libraries(dl) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 endif() |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 else() |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 add_definitions( |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 -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
|
29 ) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 endif() |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 if (CMAKE_SYSTEM_NAME STREQUAL "Windows" AND |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 CMAKE_COMPILER_IS_GNUCXX) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 # This is a patch for MinGW64 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 add_definitions(-D_TIMESPEC_DEFINED=1) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 endif() |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 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
|
40 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 else() |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 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
|
43 if (NOT HAVE_CIVETWEB_H) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 message(FATAL_ERROR "Please install the libcivetweb-devel package") |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 endif() |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 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
|
48 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
|
49 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
|
50 if (NOT HAVE_CIVETWEB_LIB) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 message(FATAL_ERROR "Please install the libcivetweb-devel package") |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 endif() |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 link_libraries(civetweb) |
32bea64e070b
Experimental support of actively maintained Civetweb to replace Mongoose 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 endif() |