CMakeLists.txt 537 B

1234567891011121314151617181920212223242526
  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_syntax
  6. SOURCES
  7. syntaxtest.cpp
  8. INCLUDE_DIRECTORIES
  9. ../../shared
  10. LIBRARIES
  11. Qt::Test
  12. Qt::Protobuf
  13. )
  14. qt6_protobuf_generate(TARGET tst_protobuf_syntax
  15. PROTO_FILES
  16. syntax.proto
  17. FIELDENUM
  18. ${extra_generator_args}
  19. OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/qt_protobuf_generated"
  20. )
  21. if(TARGET Qt::QuickTest)
  22. add_subdirectory(qml)
  23. endif()