Mercurial > trustbridge
diff 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 |
line wrap: on
line diff
--- a/ui/tests/CMakeLists.txt Fri Apr 25 10:14:33 2014 +0000 +++ b/ui/tests/CMakeLists.txt Fri Apr 25 10:15:39 2014 +0000 @@ -31,7 +31,9 @@ ${CMAKE_CURRENT_SOURCE_DIR}/data/testdata.qrc) add_executable(${_name} ${_test_sources_with_resources}) add_test(tb-${_name} ${_name}) - target_link_libraries(${_name} Qt5::Test Qt5::Widgets + target_link_libraries(${_name} + ui_common + Qt5::Test Qt5::Widgets trustbridge_common ${POLARSSL_LIBRARIES} ${EXTRA_STATIC_LIBS}) @@ -44,26 +46,24 @@ # Downloader if (HIAWATHA_EXECUTABLE) - set(DOWNLOADER_SOURCES_WITH_RESOURCES ${DOWNLOADER_SOURCES}) qt5_add_resources(DOWNLOADER_SOURCES_WITH_RESOURCES ${TRUSTBRIDGE_RESOURCES}) add_custom_test(downloadertest.cpp "${DOWNLOADER_SOURCES_WITH_RESOURCES}") endif() # Cinstprocess -add_custom_test(cinstprocesstest.cpp "${CERTIFICATELIST_SOURCES}") +add_custom_test(cinstprocesstest.cpp "") add_dependencies(cinstprocesstest cinst) add_custom_test(commontest.cpp "") -add_custom_test(createcertlisttest.cpp "${CERTIFICATELIST_SOURCES};${CMAKE_SOURCE_DIR}/ui/sslhelp.cpp;${CMAKE_SOURCE_DIR}/ui/createcertlistdialog.cpp") +add_custom_test(createcertlisttest.cpp "") if (WIN32) - add_custom_test(windowsstoretest.cpp "${CERTIFICATELIST_SOURCES};${CMAKE_SOURCE_DIR}/cinst/windowsstore.c") + add_custom_test(windowsstoretest.cpp "${CMAKE_SOURCE_DIR}/cinst/windowsstore.c") endif (WIN32) if (NSS_FOUND) include_directories(${NSS_INCLUDE_DIRS}) set(NSSTEST_SOURCES - ${CERTIFICATELIST_SOURCES} ${CMAKE_SOURCE_DIR}/cinst/nssstore_linux.c ${CMAKE_SOURCE_DIR}/cinst/nssstore_win.c) add_custom_test(nsstest.cpp "${NSSTEST_SOURCES}")