Mercurial > trustbridge
comparison ui/CMakeLists.txt @ 496:fa3a7ebf0049
Move some common UI code into a library to avoid recompiling for each test
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 25 Apr 2014 10:15:39 +0000 |
parents | f8b480b08532 |
children | 5e77d1c4826c |
comparison
equal
deleted
inserted
replaced
495:7a8f5b85fd9a | 496:fa3a7ebf0049 |
---|---|
10 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../common) | 10 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../common) |
11 add_definitions(${Qt5Widgets_DEFINITIONS}) | 11 add_definitions(${Qt5Widgets_DEFINITIONS}) |
12 | 12 |
13 find_package(Qt5LinguistTools) | 13 find_package(Qt5LinguistTools) |
14 | 14 |
15 set(CERTIFICATELIST_SOURCES | 15 # Common code is used in either the client or the administrat |
16 # application or in unit tests. | |
17 set(UICOMMON_SOURCES | |
16 ${CMAKE_CURRENT_SOURCE_DIR}/certificatelist.cpp | 18 ${CMAKE_CURRENT_SOURCE_DIR}/certificatelist.cpp |
17 ${CMAKE_CURRENT_SOURCE_DIR}/certificate.cpp | 19 ${CMAKE_CURRENT_SOURCE_DIR}/certificate.cpp |
18 ) | |
19 | |
20 set(DOWNLOADER_SOURCES | |
21 ${CMAKE_CURRENT_SOURCE_DIR}/downloader.cpp | 20 ${CMAKE_CURRENT_SOURCE_DIR}/downloader.cpp |
22 ${CMAKE_CURRENT_SOURCE_DIR}/sslconnection.cpp | 21 ${CMAKE_CURRENT_SOURCE_DIR}/sslconnection.cpp |
23 ${CMAKE_CURRENT_SOURCE_DIR}/sslhelp.cpp | 22 ${CMAKE_CURRENT_SOURCE_DIR}/sslhelp.cpp |
23 ${CMAKE_CURRENT_SOURCE_DIR}/aboutdialog.cpp | |
24 ${CMAKE_CURRENT_SOURCE_DIR}/createcertlistdialog.cpp | |
24 ) | 25 ) |
25 | 26 |
26 set(TRUSTBRIDGE_SOURCES | 27 set(TRUSTBRIDGE_SOURCES |
28 ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp | |
27 ${CMAKE_CURRENT_SOURCE_DIR}/mainwindow.cpp | 29 ${CMAKE_CURRENT_SOURCE_DIR}/mainwindow.cpp |
28 ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp | |
29 ${CMAKE_CURRENT_SOURCE_DIR}/helpdialog.cpp | 30 ${CMAKE_CURRENT_SOURCE_DIR}/helpdialog.cpp |
30 ${CMAKE_CURRENT_SOURCE_DIR}/aboutdialog.cpp | |
31 ${CMAKE_CURRENT_SOURCE_DIR}/statusdialog.cpp | 31 ${CMAKE_CURRENT_SOURCE_DIR}/statusdialog.cpp |
32 ${CMAKE_CURRENT_SOURCE_DIR}/certificateitemdelegate.cpp | 32 ${CMAKE_CURRENT_SOURCE_DIR}/certificateitemdelegate.cpp |
33 ${CMAKE_CURRENT_SOURCE_DIR}/separatoritemdelegate.cpp | 33 ${CMAKE_CURRENT_SOURCE_DIR}/separatoritemdelegate.cpp |
34 ${CMAKE_CURRENT_SOURCE_DIR}/installwrapper.cpp | 34 ${CMAKE_CURRENT_SOURCE_DIR}/installwrapper.cpp |
35 ${CERTIFICATELIST_SOURCES} | 35 ${CERTIFICATELIST_SOURCES} |
40 ${CMAKE_CURRENT_SOURCE_DIR}/administrator.cpp | 40 ${CMAKE_CURRENT_SOURCE_DIR}/administrator.cpp |
41 ${CMAKE_CURRENT_SOURCE_DIR}/administratorwindow.cpp | 41 ${CMAKE_CURRENT_SOURCE_DIR}/administratorwindow.cpp |
42 ${CMAKE_CURRENT_SOURCE_DIR}/certificatetablemodel.cpp | 42 ${CMAKE_CURRENT_SOURCE_DIR}/certificatetablemodel.cpp |
43 ${CMAKE_CURRENT_SOURCE_DIR}/certificatetabledelegate.cpp | 43 ${CMAKE_CURRENT_SOURCE_DIR}/certificatetabledelegate.cpp |
44 ${CMAKE_CURRENT_SOURCE_DIR}/createinstallerdialog.cpp | 44 ${CMAKE_CURRENT_SOURCE_DIR}/createinstallerdialog.cpp |
45 ${CMAKE_CURRENT_SOURCE_DIR}/createcertlistdialog.cpp | |
46 ${CMAKE_CURRENT_SOURCE_DIR}/aboutdialog.cpp | |
47 ${CMAKE_CURRENT_SOURCE_DIR}/sslhelp.cpp | |
48 ${CERTIFICATELIST_SOURCES} | 45 ${CERTIFICATELIST_SOURCES} |
49 ) | 46 ) |
50 | 47 |
51 # Seperated to make it easier to include the sources in tests | 48 # Seperated to make it easier to include the sources in tests |
52 set(TRUSTBRIDGE_RESOURCES | 49 set(TRUSTBRIDGE_RESOURCES |
134 message (STATUS "WARNING: Could not find qt linguist tools. Translation will not be included.") | 131 message (STATUS "WARNING: Could not find qt linguist tools. Translation will not be included.") |
135 add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES}) | 132 add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES}) |
136 add_executable(trustbridge ${TRUSTBRIDGE_SOURCES_WITH_RESOURCES}) | 133 add_executable(trustbridge ${TRUSTBRIDGE_SOURCES_WITH_RESOURCES}) |
137 endif() | 134 endif() |
138 | 135 |
136 add_library(ui_common STATIC ${UICOMMON_SOURCES}) | |
137 | |
139 target_link_libraries(administrator Qt5::Widgets | 138 target_link_libraries(administrator Qt5::Widgets |
139 ui_common | |
140 trustbridge_common | 140 trustbridge_common |
141 ${POLARSSL_LIBRARIES} | 141 ${POLARSSL_LIBRARIES} |
142 ${EXTRA_STATIC_LIBS} | 142 ${EXTRA_STATIC_LIBS} |
143 ${PROFILING_LIBS}) | 143 ${PROFILING_LIBS}) |
144 | 144 |
145 target_link_libraries(trustbridge Qt5::Widgets | 145 target_link_libraries(trustbridge Qt5::Widgets |
146 ui_common | |
146 trustbridge_common | 147 trustbridge_common |
147 ${POLARSSL_LIBRARIES} | 148 ${POLARSSL_LIBRARIES} |
148 ${EXTRA_STATIC_LIBS} | 149 ${EXTRA_STATIC_LIBS} |
149 ${PROFILING_LIBS}) | 150 ${PROFILING_LIBS}) |
150 | 151 |