diff Resources/CMake/MongooseConfiguration.cmake @ 23:62bd05fe4b7c

support for ssl
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 28 Aug 2012 10:18:34 +0200
parents 3a584803783e
children 6ba765ecf3db
line wrap: on
line diff
--- a/Resources/CMake/MongooseConfiguration.cmake	Mon Aug 27 11:45:53 2012 +0200
+++ b/Resources/CMake/MongooseConfiguration.cmake	Tue Aug 28 10:18:34 2012 +0200
@@ -15,9 +15,20 @@
   ${MONGOOSE_SOURCES_DIR}/mongoose.c
   )
 
-add_definitions(
-  # Remove SSL support from mongoose
-  -DNO_SSL=1
-  )
+if (${ENABLE_SSL})
+  add_definitions(
+    -DPALANTIR_SSL_ENABLED=1
+    )
+  if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+    link_libraries(dl)
+  endif()
+
+else()
+  add_definitions(
+    -DPALANTIR_SSL_ENABLED=0
+    -DNO_SSL=1   # Remove SSL support from mongoose
+    )
+endif()
+
 
 source_group(ThirdParty\\Mongoose REGULAR_EXPRESSION ${MONGOOSE_SOURCES_DIR}/.*)