comparison ui/tests/CMakeLists.txt @ 326:ad28f6b60e6b

Fix nsstest build for windows
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 07 Apr 2014 14:50:08 +0000
parents 2fd69803d219
children 455d6d00e896
comparison
equal deleted inserted replaced
325:c89bfb0e638e 326:ad28f6b60e6b
16 endif() 16 endif()
17 17
18 macro(add_m13_test _source _additional_sources) 18 macro(add_m13_test _source _additional_sources)
19 set(_test ${_source}) 19 set(_test ${_source})
20 get_filename_component(_name ${_source} NAME_WE) 20 get_filename_component(_name ${_source} NAME_WE)
21 set(_test_sources_with_resources ${_test} "${_additional_sources};${CMAKE_CURRENT_SOURCE_DIR}/common.cpp") 21 set(_test_sources_with_resources ${_test}
22 "${_additional_sources};${CMAKE_CURRENT_SOURCE_DIR}/common.cpp")
22 qt5_add_resources(_test_sources_with_resources 23 qt5_add_resources(_test_sources_with_resources
23 ${CMAKE_CURRENT_SOURCE_DIR}/data/testdata.qrc) 24 ${CMAKE_CURRENT_SOURCE_DIR}/data/testdata.qrc)
24 add_executable(${_name} ${_test_sources_with_resources}) 25 add_executable(${_name} ${_test_sources_with_resources})
25 add_test(m13-${_name} ${_name}) 26 add_test(m13-${_name} ${_name})
26 target_link_libraries(${_name} Qt5::Test Qt5::Widgets 27 target_link_libraries(${_name} Qt5::Test Qt5::Widgets
49 if (WIN32) 50 if (WIN32)
50 add_m13_test(windowsstoretest.cpp "${CERTIFICATELIST_SOURCES};${CMAKE_SOURCE_DIR}/cinst/windowsstore.c") 51 add_m13_test(windowsstoretest.cpp "${CERTIFICATELIST_SOURCES};${CMAKE_SOURCE_DIR}/cinst/windowsstore.c")
51 endif (WIN32) 52 endif (WIN32)
52 53
53 if (NSS_FOUND) 54 if (NSS_FOUND)
54 include_directories(${NSS_INCLUDE_DIRS}) 55 include_directories(${NSS_INCLUDE_DIRS})
55 add_m13_test(nsstest.cpp "${CERTIFICATELIST_SOURCES};${CMAKE_SOURCE_DIR}/cinst/nssstore_linux.c") 56 add_m13_test(nsstest.cpp "${CERTIFICATELIST_SOURCES};${CMAKE_SOURCE_DIR}/cinst/nssstore_linux.c;${CMAKE_SOURCE_DIR}/cinst/nssstore_win.c")
56 target_link_libraries(nsstest ${NSS_LIBRARIES}) 57 target_link_libraries(nsstest ${NSS_LIBRARIES})
57 add_dependencies(nsstest mozilla) 58 if (WIN32)
59 target_link_libraries(nsstest -luserenv)
60 endif()
61
62 add_dependencies(nsstest mozilla)
58 endif() 63 endif()
59 64
60 #add_m13_test(${CMAKE_SOURCE_DIR}/ui/main.cpp "${M13UI_SOURCES}") 65 #add_m13_test(${CMAKE_SOURCE_DIR}/ui/main.cpp "${M13UI_SOURCES}")
61 66

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