CMakeLists.txt 598 B

123456789101112131415161718192021222324252627
  1. unset(extra_generator_args)
  2. if(TARGET Qt::Qml)
  3. list(APPEND extra_generator_args QML)
  4. endif()
  5. qt_internal_add_test(tst_protobuf_nestedtypes
  6. SOURCES
  7. nestedtypes.cpp
  8. INCLUDE_DIRECTORIES
  9. ../../shared
  10. LIBRARIES
  11. Qt::Test
  12. Qt::Protobuf
  13. )
  14. qt6_protobuf_generate(TARGET tst_protobuf_nestedtypes
  15. PROTO_FILES
  16. proto/nestedmessages.proto
  17. proto/externalpackage.proto
  18. ${extra_generator_args}
  19. FIELDENUM
  20. OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/qt_protobuf_generated"
  21. )
  22. if(TARGET Qt::QuickTest)
  23. add_subdirectory(qml)
  24. endif()