CMakeLists.txt 709 B

1234567891011121314151617181920212223242526272829
  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_extranamespace
  6. SOURCES
  7. extranamespace.cpp
  8. # TODO Qt6: Missing source files?
  9. # serializationtest.cpp
  10. # deserializationtest.cpp
  11. INCLUDE_DIRECTORIES
  12. ../../shared
  13. LIBRARIES
  14. Qt::Test
  15. Qt::Protobuf
  16. )
  17. qt6_protobuf_generate(TARGET tst_protobuf_extranamespace
  18. OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/qt_protobuf_generated"
  19. PROTO_FILES proto/extranamespace.proto
  20. EXTRA_NAMESPACE "MyTestNamespace"
  21. FIELDENUM
  22. ${extra_generator_args}
  23. )
  24. if(TARGET Qt::QuickTest)
  25. add_subdirectory(qml)
  26. endif()