annotate ui/CMakeLists.txt @ 117:080660b2ce7d

Merged
author Sascha Wilde <wilde@intevation.de>
date Fri, 21 Mar 2014 17:46:09 +0100
parents 16f37460b2e1
children 2d50ff378367
rev   line source
33
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
1 include_directories(${Qt5Widgets_INCLUDE_DIRS})
57
d1aaee32e491 Include POLARSSL_INCLUDE_DIR in ui too
Andre Heinecke <aheinecke@intevation.de>
parents: 45
diff changeset
2 include_directories(${POLARSSL_INCLUDE_DIR})
33
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
3 add_definitions(${Qt5Widgets_DEFINITIONS})
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
4
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
5 set(CERTIFICATELIST_SOURCES
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
6 ${CMAKE_CURRENT_SOURCE_DIR}/certificatelist.cpp
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
7 ${CMAKE_CURRENT_SOURCE_DIR}/certificate.cpp
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
8 )
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
9
45
c6125d73faf4 Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents: 39
diff changeset
10 set(DOWNLOADER_SOURCES
33
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
11 ${CMAKE_CURRENT_SOURCE_DIR}/downloader.cpp
45
c6125d73faf4 Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents: 39
diff changeset
12 ${CMAKE_CURRENT_SOURCE_DIR}/sslconnection.cpp
c6125d73faf4 Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents: 39
diff changeset
13 )
c6125d73faf4 Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents: 39
diff changeset
14
c6125d73faf4 Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents: 39
diff changeset
15 set(M13UI_SOURCES
c6125d73faf4 Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents: 39
diff changeset
16 ${CMAKE_CURRENT_SOURCE_DIR}/mainwindow.cpp
33
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
17 ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
71
f22a99f7cb69 Add certificatelist to install as member. Look for updates on startup
Andre Heinecke <aheinecke@intevation.de>
parents: 68
diff changeset
18 ${CMAKE_CURRENT_SOURCE_DIR}/listupdatedialog.cpp
33
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
19 ${CERTIFICATELIST_SOURCES}
45
c6125d73faf4 Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents: 39
diff changeset
20 ${DOWNLOADER_SOURCES}
33
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
21 )
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
22
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
23 # Seperated to make it easier to include the sources in tests
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
24 set(M13UI_RESOURCES
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
25 ${CMAKE_CURRENT_SOURCE_DIR}/icons.qrc
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
26 ${CMAKE_CURRENT_SOURCE_DIR}/certs.qrc
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
27 )
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
28
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
29 if(UNIX)
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
30 # See: https://bugreports.qt-project.org/browse/QTBUG-35918
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
31 # XCB_EXTRA_LIBS should be gotten automatically.
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
32 # The following list is taken from the .pri file
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
33 get_target_property(_loc Qt5::Widgets LOCATION)
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
34 get_filename_component(_qtpath ${_loc} PATH)
107
5b9af103a355 Allow developers to overwrite the hardcoded xkb-common libname
Andre Heinecke <aheinecke@intevation.de>
parents: 81
diff changeset
35
5b9af103a355 Allow developers to overwrite the hardcoded xkb-common libname
Andre Heinecke <aheinecke@intevation.de>
parents: 81
diff changeset
36 if(NOT XKBCOMMON_LIB)
5b9af103a355 Allow developers to overwrite the hardcoded xkb-common libname
Andre Heinecke <aheinecke@intevation.de>
parents: 81
diff changeset
37 # Hack on a hack to overwrite the xkbcommon libname.
5b9af103a355 Allow developers to overwrite the hardcoded xkb-common libname
Andre Heinecke <aheinecke@intevation.de>
parents: 81
diff changeset
38 set(XKBCOMMON_LIB -lxkbcommon)
108
39c42b5a5693 Syntax fix
Andre Heinecke <aheinecke@intevation.de>
parents: 107
diff changeset
39 endif()
107
5b9af103a355 Allow developers to overwrite the hardcoded xkb-common libname
Andre Heinecke <aheinecke@intevation.de>
parents: 81
diff changeset
40
33
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
41 set(XCB_EXTRA_LIBS
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
42 -L${_qtpath}
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
43 -lX11 -lX11-xcb -lXi -lxcb-render-util -lXrender -lSM -lICE -lxcb-render -ldbus-1
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
44 -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr
107
5b9af103a355 Allow developers to overwrite the hardcoded xkb-common libname
Andre Heinecke <aheinecke@intevation.de>
parents: 81
diff changeset
45 ${XKBCOMMON_LIB} -lxcb-shape -lxcb-keysyms -lQt5PlatformSupport
33
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
46 -lfreetype -lQt5DBus -lQt5Gui -ljpeg -lpng -lQt5Core
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
47 -lz -lm -ldl -lrt -lpthread)
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
48
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
49 set(EXTRA_STATIC_LIBS -lz -lpthread -ldl -lpng -ljpeg
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
50 Qt5::QXcbIntegrationPlugin ${XCB_EXTRA_LIBS})
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
51
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
52 elseif(WIN32)
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
53 get_target_property(_loc Qt5::Widgets LOCATION)
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
54 get_filename_component(_qtpath ${_loc} PATH)
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
55 set(WINDOWS_EXTRA_LIBS
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
56 -L${_qtpath}
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
57 -lwinspool -lshlwapi -lfreetype -lbz2 -lpng16
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
58 -lQt5PlatformSupport -lQt5Gui -lcomdlg32 -loleaut32 -limm32 -lwinmm
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
59 -lglu32 -lopengl32 -lgdi32 -ljpeg -lpng -lQt5Core -lole32 -luuid -lws2_32
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
60 -ladvapi32 -lshell32 -luser32 -lkernel32 -lz -lsicuin -lsicuuc -lsicudt -lpcre16)
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
61
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
62 set(EXTRA_STATIC_LIBS Qt5::QWindowsIntegrationPlugin ${WINDOWS_EXTRA_LIBS} -lwinhttp -lcrypt32)
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
63 endif()
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
64
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
65 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
66
62
aa707f111e89 Readd cppcheck to static_check dependencies
Andre Heinecke <aheinecke@intevation.de>
parents: 57
diff changeset
67 generate_cppcheck(SOURCES ${CINST_SOURCES} ${M13UI_SOURCES} TARGET_NAME m13_cppcheck)
aa707f111e89 Readd cppcheck to static_check dependencies
Andre Heinecke <aheinecke@intevation.de>
parents: 57
diff changeset
68 add_dependencies(static_check m13_cppcheck)
33
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
69
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
70 # Adding resources here in an extra variable to enable reuse of
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
71 # M13UI_SOURCES in the test subdirectory.
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
72 set(M13UI_SOURCES_WITH_RESOURCES ${M13UI_SOURCES})
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
73 qt5_add_resources(M13UI_SOURCES_WITH_RESOURCES ${M13UI_RESOURCES})
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
74 add_executable(m13ui ${M13UI_SOURCES_WITH_RESOURCES})
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
75
39
ee27186fc8e6 Minor: Whitespace change
Andre Heinecke <aheinecke@intevation.de>
parents: 37
diff changeset
76 target_link_libraries(m13ui Qt5::Widgets
109
16f37460b2e1 Use m13_common library
Andre Heinecke <aheinecke@intevation.de>
parents: 108
diff changeset
77 m13_common
68
8ffbb48528ae Add certificate installation for windows
Andre Heinecke <aheinecke@intevation.de>
parents: 62
diff changeset
78 ${POLARSSL_LIBRARIES}
33
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
79 ${EXTRA_STATIC_LIBS}
68
8ffbb48528ae Add certificate installation for windows
Andre Heinecke <aheinecke@intevation.de>
parents: 62
diff changeset
80 ${PROFILING_LIBS})
33
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
81
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
82 # Tests
25c08d63d2b7 Add CMakeLists in UI
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
83 add_subdirectory(tests)

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