comparison ui/tests/CMakeLists.txt @ 556:5dc4aa684c63

Symlink mozilla executable into the test directory
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 22 May 2014 08:59:13 +0000
parents bedeb38c244a
children dd8a295d5b4d
comparison
equal deleted inserted replaced
555:4cc378f335f5 556:5dc4aa684c63
71 if (WIN32) 71 if (WIN32)
72 target_link_libraries(nsstest -luserenv) 72 target_link_libraries(nsstest -luserenv)
73 endif() 73 endif()
74 74
75 add_dependencies(nsstest mozilla) 75 add_dependencies(nsstest mozilla)
76
77 # NSS code searches the mozilla process in the same path as the caller
78 if (WIN32)
79 file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/mozilla.exe" link)
80 file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/../../cinst/mozilla.exe" target)
81 else()
82 file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/mozilla" link)
83 file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/../../cinst/mozilla" target)
84 endif()
85
86 if (NOT EXISTS ${link})
87 if (CMAKE_HOST_UNIX)
88 set(command ln -s ${target} ${link})
89 else()
90 set(command cmd.exe /c mklink ${link} ${target})
91 endif()
92 execute_process(COMMAND ${command}
93 RESULT_VARIABLE result
94 ERROR_VARIABLE output)
95 if (NOT ${result} EQUAL 0)
96 message(FATAL_ERROR "Could not create symbolic link for: ${target} --> ${output}")
97 endif()
98 endif()
76 endif() 99 endif()
77 100
78 #add_custom_test(${CMAKE_SOURCE_DIR}/ui/main.cpp "${TRUSTBRIDGE_SOURCES}") 101 #add_custom_test(${CMAKE_SOURCE_DIR}/ui/main.cpp "${TRUSTBRIDGE_SOURCES}")
79 102

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