Attempted to fix issue with running tests on Windows.
This commit is contained in:
@@ -20,6 +20,14 @@ foreach(TEST ${TESTS})
|
||||
target_link_libraries(${TEST} QHttpEngine common)
|
||||
add_test(NAME ${TEST}
|
||||
COMMAND ${TEST}
|
||||
WORKING_DIRECTORY "$<TARGET_FILE_DIR:QHttpEngine>"
|
||||
)
|
||||
endforeach()
|
||||
|
||||
# On Windows, the library's DLL must exist in the same directory as the test
|
||||
# executables which link against it - create a custom command to copy it
|
||||
if(WIN32 NOT BUILD_STATIC)
|
||||
add_custom_target(QHttpEngine-copy ALL
|
||||
"${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:QHttpEngine>" "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
DEPENDS QHttpEngine
|
||||
)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user