CMakeLists.txt 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. include(${QT_PROTOBUF_CMAKE_DIR}/QtProtobufInternalHelpers.cmake)
  2. qt_protobuf_internal_find_dependencies()
  3. # clients
  4. qt_protobuf_internal_add_test_target(TARGET qtgrpc_test
  5. SOURCES clienttest.cpp QML)
  6. add_target_windeployqt(TARGET qtgrpc_test
  7. QML_DIR ${CMAKE_CURRENT_SOURCE_DIR})
  8. qt_protobuf_internal_add_test_target(TARGET qtgrpc_secure_test
  9. SOURCES sslclienttest.cpp)
  10. add_target_windeployqt(TARGET qtgrpc_secure_test
  11. QML_DIR ${CMAKE_CURRENT_SOURCE_DIR})
  12. # servers
  13. add_subdirectory(echoserver)
  14. add_subdirectory(secureechoserver)
  15. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/testfile ${CMAKE_CURRENT_BINARY_DIR}/testfile COPYONLY)
  16. if(UNIX)
  17. set(TEST_DRIVER_NAME "test_driver.sh")
  18. elseif(WIN32)
  19. set(TEST_DRIVER_NAME "test_driver.bat")
  20. endif()
  21. configure_file(${TEST_DRIVER_NAME}.in ${TEST_DRIVER_NAME} @ONLY)
  22. add_test(NAME qtgrpc_echo_test
  23. COMMAND ${TEST_DRIVER_NAME} $<TARGET_FILE:qtgrpc_test> $<TARGET_FILE:echoserver> $<TARGET_FILE_NAME:qtgrpc_test> $<TARGET_FILE_NAME:echoserver>
  24. )
  25. add_test(NAME qtgrpc_secure_test
  26. COMMAND ${TEST_DRIVER_NAME} $<TARGET_FILE:qtgrpc_secure_test> $<TARGET_FILE:secureechoserver> $<TARGET_FILE_NAME:qtgrpc_secure_test> $<TARGET_FILE_NAME:secureechoserver>
  27. )