8
|
1 SET(MONGOOSE_SOURCES_DIR ${CMAKE_BINARY_DIR}/mongoose)
|
|
2 DownloadPackage("http://mongoose.googlecode.com/files/mongoose-3.1.tgz" "${MONGOOSE_SOURCES_DIR}" "" "")
|
|
3
|
|
4 # Patch mongoose
|
|
5 execute_process(
|
|
6 COMMAND patch mongoose.c ${CMAKE_SOURCE_DIR}/Resources/mongoose-patch.diff
|
|
7 WORKING_DIRECTORY ${MONGOOSE_SOURCES_DIR}
|
|
8 )
|
|
9
|
|
10 include_directories(
|
|
11 ${MONGOOSE_SOURCES_DIR}
|
|
12 )
|
|
13
|
|
14 list(APPEND THIRD_PARTY_SOURCES
|
|
15 ${MONGOOSE_SOURCES_DIR}/mongoose.c
|
|
16 )
|
|
17
|
26
|
18
|
23
|
19 if (${ENABLE_SSL})
|
|
20 add_definitions(
|
|
21 -DPALANTIR_SSL_ENABLED=1
|
26
|
22 -DNO_SSL_DL=1
|
23
|
23 )
|
|
24 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
|
25 link_libraries(dl)
|
|
26 endif()
|
|
27
|
|
28 else()
|
|
29 add_definitions(
|
|
30 -DPALANTIR_SSL_ENABLED=0
|
|
31 -DNO_SSL=1 # Remove SSL support from mongoose
|
|
32 )
|
|
33 endif()
|
|
34
|
8
|
35
|
|
36 source_group(ThirdParty\\Mongoose REGULAR_EXPRESSION ${MONGOOSE_SOURCES_DIR}/.*)
|