annotate Resources/CMake/MongooseConfiguration.cmake @ 407:2d269089078f

reintegration of lua scripting into mainline
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 02 May 2013 16:49:28 +0200
parents 0db2713b91d8 b45bc565d82a
children 5f6d75cd4b46
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
389
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
1 if (STATIC_BUILD OR NOT USE_DYNAMIC_MONGOOSE)
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
2 SET(MONGOOSE_SOURCES_DIR ${CMAKE_BINARY_DIR}/mongoose)
396
0db2713b91d8 hosting of third party downloads on my own webserver
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 391
diff changeset
3 DownloadPackage("http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/mongoose-3.1.tgz" "${MONGOOSE_SOURCES_DIR}" "" "")
8
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
4
389
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
5 # Patch mongoose
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
6 execute_process(
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
7 COMMAND patch mongoose.c ${CMAKE_SOURCE_DIR}/Resources/Patches/mongoose-patch.diff
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
8 WORKING_DIRECTORY ${MONGOOSE_SOURCES_DIR}
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
9 )
8
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
10
389
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
11 include_directories(
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
12 ${MONGOOSE_SOURCES_DIR}
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
13 )
8
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
14
389
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
15 list(APPEND THIRD_PARTY_SOURCES
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
16 ${MONGOOSE_SOURCES_DIR}/mongoose.c
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
17 )
8
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
18
26
6ba765ecf3db compiling openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 23
diff changeset
19
389
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
20 if (${ENABLE_SSL})
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
21 add_definitions(
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
22 -DNO_SSL_DL=1
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
23 )
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
24 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
25 link_libraries(dl)
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
26 endif()
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
27
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
28 else()
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
29 add_definitions(
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
30 -DNO_SSL=1 # Remove SSL support from mongoose
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
31 )
23
62bd05fe4b7c support for ssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
32 endif()
62bd05fe4b7c support for ssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
33
389
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
34 source_group(ThirdParty\\Mongoose REGULAR_EXPRESSION ${MONGOOSE_SOURCES_DIR}/.*)
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
35
23
62bd05fe4b7c support for ssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
36 else()
389
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
37 CHECK_INCLUDE_FILE_CXX(mongoose.h HAVE_MONGOOSE_H)
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
38 if (NOT HAVE_MONGOOSE_H)
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
39 message(FATAL_ERROR "Please install the mongoose-devel package")
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
40 endif()
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
41
391
jodogne
parents: 389
diff changeset
42 CHECK_LIBRARY_EXISTS(mongoose mg_start "" HAVE_MONGOOSE_LIB)
389
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
43 if (NOT HAVE_MONGOOSE_LIB)
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
44 message(FATAL_ERROR "Please install the mongoose-devel package")
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
45 endif()
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
46
9aa8ecbeeeb9 dynamically linking against Mongoose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
47 link_libraries(mongoose)
23
62bd05fe4b7c support for ssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
48 endif()