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(
|
26
|
21 -DNO_SSL_DL=1
|
23
|
22 )
|
|
23 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
|
24 link_libraries(dl)
|
|
25 endif()
|
|
26
|
|
27 else()
|
|
28 add_definitions(
|
|
29 -DNO_SSL=1 # Remove SSL support from mongoose
|
|
30 )
|
|
31 endif()
|
|
32
|
8
|
33
|
|
34 source_group(ThirdParty\\Mongoose REGULAR_EXPRESSION ${MONGOOSE_SOURCES_DIR}/.*)
|