diff ui/CMakeLists.txt @ 908:d1c951b3012d

Curl based implementation of sslconnection
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 13 Aug 2014 19:35:08 +0200
parents 6abf8e77cd5f
children eaed02defe6a
line wrap: on
line diff
--- a/ui/CMakeLists.txt	Thu Aug 14 08:19:30 2014 +0200
+++ b/ui/CMakeLists.txt	Wed Aug 13 19:35:08 2014 +0200
@@ -12,6 +12,9 @@
 add_definitions(${Qt5Widgets_DEFINITIONS})
 
 find_package(Qt5LinguistTools)
+find_package(CURL)
+
+include_directories(${CURL_INCLUDE_DIRS})
 
 # Common code is used in either the client or the administrator
 # application or in unit tests.
@@ -19,10 +22,17 @@
     ${CMAKE_CURRENT_SOURCE_DIR}/certificatelist.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/certificate.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/downloader.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/sslconnection.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/sslconnection_bare.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/sslhelp.cpp
 )
 
+if (${CURL_FOUND})
+   set(UICOMMON_SOURCES ${UICOMMON_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/sslconnection_curl.cpp)
+   add_definitions(-DUSE_CURL)
+else()
+   MESSAGE(STATUS "Warning curl not found only bare polarssl ssl will be supported.")
+endif()
+
 # Cmake does not correctly identify gcc windres when cross compiling
 # making this line neccessary to set the correct flags for it.
 # See: http://public.kitware.com/Bug/view.php?id=11773
@@ -194,6 +204,8 @@
    Qt5::Widgets
    ui_common
    trustbridge_common
+   ${CURL_LIBRARIES}
+   z
    ${POLARSSL_LIBRARIES}
    ${EXTRA_STATIC_LIBS}
    ${PROFILING_LIBS})

http://wald.intevation.org/projects/trustbridge/