CMakeLists.txt 1016 B

12345678910111213141516171819202122232425262728
  1. set(TARGET qtprotobuf_plugin_test)
  2. qt_protobuf_internal_find_dependencies()
  3. find_package(Qt5 CONFIG COMPONENTS Test REQUIRED)
  4. find_package(Threads REQUIRED)
  5. file(GLOB SOURCES
  6. serializationplugintest.cpp)
  7. add_executable(${TARGET} ${SOURCES})
  8. target_link_libraries(${TARGET} PRIVATE gtest_main
  9. gtest
  10. ${QT_PROTOBUF_NAMESPACE}::Protobuf
  11. ${QT_PROTOBUF_NAMESPACE}::Grpc
  12. Qt5::Core
  13. Qt5::Test
  14. Qt5::Network
  15. ${CMAKE_THREAD_LIBS_INIT})
  16. qt_protobuf_internal_add_target_windeployqt(TARGET ${TARGET}
  17. QML_DIR ${CMAKE_CURRENT_SOURCE_DIR})
  18. add_subdirectory("serialization")
  19. add_test(NAME ${TARGET} COMMAND ${TARGET})
  20. set_tests_properties(${TARGET} PROPERTIES
  21. ENVIRONMENT QT_PROTOBUF_PLUGIN_PATH=$<TARGET_FILE_DIR:serializationplugin>)