comparison 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
comparison
equal deleted inserted replaced
907:7bd75417e14e 908:d1c951b3012d
10 include_directories(${CMAKE_SOURCE_DIR}/common) 10 include_directories(${CMAKE_SOURCE_DIR}/common)
11 include_directories(${CMAKE_BINARY_DIR}/common) 11 include_directories(${CMAKE_BINARY_DIR}/common)
12 add_definitions(${Qt5Widgets_DEFINITIONS}) 12 add_definitions(${Qt5Widgets_DEFINITIONS})
13 13
14 find_package(Qt5LinguistTools) 14 find_package(Qt5LinguistTools)
15 find_package(CURL)
16
17 include_directories(${CURL_INCLUDE_DIRS})
15 18
16 # Common code is used in either the client or the administrator 19 # Common code is used in either the client or the administrator
17 # application or in unit tests. 20 # application or in unit tests.
18 set(UICOMMON_SOURCES 21 set(UICOMMON_SOURCES
19 ${CMAKE_CURRENT_SOURCE_DIR}/certificatelist.cpp 22 ${CMAKE_CURRENT_SOURCE_DIR}/certificatelist.cpp
20 ${CMAKE_CURRENT_SOURCE_DIR}/certificate.cpp 23 ${CMAKE_CURRENT_SOURCE_DIR}/certificate.cpp
21 ${CMAKE_CURRENT_SOURCE_DIR}/downloader.cpp 24 ${CMAKE_CURRENT_SOURCE_DIR}/downloader.cpp
22 ${CMAKE_CURRENT_SOURCE_DIR}/sslconnection.cpp 25 ${CMAKE_CURRENT_SOURCE_DIR}/sslconnection_bare.cpp
23 ${CMAKE_CURRENT_SOURCE_DIR}/sslhelp.cpp 26 ${CMAKE_CURRENT_SOURCE_DIR}/sslhelp.cpp
24 ) 27 )
28
29 if (${CURL_FOUND})
30 set(UICOMMON_SOURCES ${UICOMMON_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/sslconnection_curl.cpp)
31 add_definitions(-DUSE_CURL)
32 else()
33 MESSAGE(STATUS "Warning curl not found only bare polarssl ssl will be supported.")
34 endif()
25 35
26 # Cmake does not correctly identify gcc windres when cross compiling 36 # Cmake does not correctly identify gcc windres when cross compiling
27 # making this line neccessary to set the correct flags for it. 37 # making this line neccessary to set the correct flags for it.
28 # See: http://public.kitware.com/Bug/view.php?id=11773 38 # See: http://public.kitware.com/Bug/view.php?id=11773
29 SET(CMAKE_RC_COMPILE_OBJECT 39 SET(CMAKE_RC_COMPILE_OBJECT
192 target_link_libraries(trustbridge 202 target_link_libraries(trustbridge
193 tblib 203 tblib
194 Qt5::Widgets 204 Qt5::Widgets
195 ui_common 205 ui_common
196 trustbridge_common 206 trustbridge_common
207 ${CURL_LIBRARIES}
208 z
197 ${POLARSSL_LIBRARIES} 209 ${POLARSSL_LIBRARIES}
198 ${EXTRA_STATIC_LIBS} 210 ${EXTRA_STATIC_LIBS}
199 ${PROFILING_LIBS}) 211 ${PROFILING_LIBS})
200 212
201 # Tests 213 # Tests

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