diff 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
line wrap: on
line diff
--- a/ui/tests/CMakeLists.txt	Mon Apr 07 13:40:54 2014 +0000
+++ b/ui/tests/CMakeLists.txt	Mon Apr 07 14:50:08 2014 +0000
@@ -18,7 +18,8 @@
 macro(add_m13_test _source _additional_sources)
   set(_test ${_source})
   get_filename_component(_name ${_source} NAME_WE)
-  set(_test_sources_with_resources ${_test} "${_additional_sources};${CMAKE_CURRENT_SOURCE_DIR}/common.cpp")
+  set(_test_sources_with_resources ${_test}
+     "${_additional_sources};${CMAKE_CURRENT_SOURCE_DIR}/common.cpp")
   qt5_add_resources(_test_sources_with_resources
      ${CMAKE_CURRENT_SOURCE_DIR}/data/testdata.qrc)
   add_executable(${_name} ${_test_sources_with_resources})
@@ -51,10 +52,14 @@
 endif (WIN32)
 
 if (NSS_FOUND)
-    include_directories(${NSS_INCLUDE_DIRS})
-    add_m13_test(nsstest.cpp "${CERTIFICATELIST_SOURCES};${CMAKE_SOURCE_DIR}/cinst/nssstore_linux.c")
-    target_link_libraries(nsstest ${NSS_LIBRARIES})
-    add_dependencies(nsstest mozilla)
+   include_directories(${NSS_INCLUDE_DIRS})
+   add_m13_test(nsstest.cpp "${CERTIFICATELIST_SOURCES};${CMAKE_SOURCE_DIR}/cinst/nssstore_linux.c;${CMAKE_SOURCE_DIR}/cinst/nssstore_win.c")
+   target_link_libraries(nsstest ${NSS_LIBRARIES})
+   if (WIN32)
+      target_link_libraries(nsstest -luserenv)
+   endif()
+
+   add_dependencies(nsstest mozilla)
 endif()
 
 #add_m13_test(${CMAKE_SOURCE_DIR}/ui/main.cpp "${M13UI_SOURCES}")

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