Mercurial > trustbridge
comparison ui/tests/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 | a53286e5b126 |
children | bedeb38c244a |
comparison
equal
deleted
inserted
replaced
495:7a8f5b85fd9a | 496:fa3a7ebf0049 |
---|---|
29 "${_additional_sources};${CMAKE_CURRENT_SOURCE_DIR}/common.cpp") | 29 "${_additional_sources};${CMAKE_CURRENT_SOURCE_DIR}/common.cpp") |
30 qt5_add_resources(_test_sources_with_resources | 30 qt5_add_resources(_test_sources_with_resources |
31 ${CMAKE_CURRENT_SOURCE_DIR}/data/testdata.qrc) | 31 ${CMAKE_CURRENT_SOURCE_DIR}/data/testdata.qrc) |
32 add_executable(${_name} ${_test_sources_with_resources}) | 32 add_executable(${_name} ${_test_sources_with_resources}) |
33 add_test(tb-${_name} ${_name}) | 33 add_test(tb-${_name} ${_name}) |
34 target_link_libraries(${_name} Qt5::Test Qt5::Widgets | 34 target_link_libraries(${_name} |
35 ui_common | |
36 Qt5::Test Qt5::Widgets | |
35 trustbridge_common | 37 trustbridge_common |
36 ${POLARSSL_LIBRARIES} | 38 ${POLARSSL_LIBRARIES} |
37 ${EXTRA_STATIC_LIBS}) | 39 ${EXTRA_STATIC_LIBS}) |
38 endmacro() | 40 endmacro() |
39 | 41 |
42 add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") | 44 add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") |
43 add_custom_test(certlistparsertest.cpp "${CERTIFICATELIST_SOURCES}") | 45 add_custom_test(certlistparsertest.cpp "${CERTIFICATELIST_SOURCES}") |
44 | 46 |
45 # Downloader | 47 # Downloader |
46 if (HIAWATHA_EXECUTABLE) | 48 if (HIAWATHA_EXECUTABLE) |
47 set(DOWNLOADER_SOURCES_WITH_RESOURCES ${DOWNLOADER_SOURCES}) | |
48 qt5_add_resources(DOWNLOADER_SOURCES_WITH_RESOURCES ${TRUSTBRIDGE_RESOURCES}) | 49 qt5_add_resources(DOWNLOADER_SOURCES_WITH_RESOURCES ${TRUSTBRIDGE_RESOURCES}) |
49 add_custom_test(downloadertest.cpp "${DOWNLOADER_SOURCES_WITH_RESOURCES}") | 50 add_custom_test(downloadertest.cpp "${DOWNLOADER_SOURCES_WITH_RESOURCES}") |
50 endif() | 51 endif() |
51 | 52 |
52 # Cinstprocess | 53 # Cinstprocess |
53 add_custom_test(cinstprocesstest.cpp "${CERTIFICATELIST_SOURCES}") | 54 add_custom_test(cinstprocesstest.cpp "") |
54 add_dependencies(cinstprocesstest cinst) | 55 add_dependencies(cinstprocesstest cinst) |
55 add_custom_test(commontest.cpp "") | 56 add_custom_test(commontest.cpp "") |
56 | 57 |
57 add_custom_test(createcertlisttest.cpp "${CERTIFICATELIST_SOURCES};${CMAKE_SOURCE_DIR}/ui/sslhelp.cpp;${CMAKE_SOURCE_DIR}/ui/createcertlistdialog.cpp") | 58 add_custom_test(createcertlisttest.cpp "") |
58 | 59 |
59 if (WIN32) | 60 if (WIN32) |
60 add_custom_test(windowsstoretest.cpp "${CERTIFICATELIST_SOURCES};${CMAKE_SOURCE_DIR}/cinst/windowsstore.c") | 61 add_custom_test(windowsstoretest.cpp "${CMAKE_SOURCE_DIR}/cinst/windowsstore.c") |
61 endif (WIN32) | 62 endif (WIN32) |
62 | 63 |
63 if (NSS_FOUND) | 64 if (NSS_FOUND) |
64 include_directories(${NSS_INCLUDE_DIRS}) | 65 include_directories(${NSS_INCLUDE_DIRS}) |
65 set(NSSTEST_SOURCES | 66 set(NSSTEST_SOURCES |
66 ${CERTIFICATELIST_SOURCES} | |
67 ${CMAKE_SOURCE_DIR}/cinst/nssstore_linux.c | 67 ${CMAKE_SOURCE_DIR}/cinst/nssstore_linux.c |
68 ${CMAKE_SOURCE_DIR}/cinst/nssstore_win.c) | 68 ${CMAKE_SOURCE_DIR}/cinst/nssstore_win.c) |
69 add_custom_test(nsstest.cpp "${NSSTEST_SOURCES}") | 69 add_custom_test(nsstest.cpp "${NSSTEST_SOURCES}") |
70 target_link_libraries(nsstest ${NSS_LIBRARIES}) | 70 target_link_libraries(nsstest ${NSS_LIBRARIES}) |
71 if (WIN32) | 71 if (WIN32) |