Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-123643

QtProtobuf: Extra Namespace option does not work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.6.1, 6.7.0 RC2
    • Protocol Buffers
    • None
    • Windows
    • ab0fac050 (dev), fc6c0d92b (6.8)

    Description

      When I use the EXTRA_NAMESPACE option with qt_add_protobuf, my project doesn't build:

      qt_add_protobuf(Protos
          PROTO_FILES "example.proto"
          EXTRA_NAMESPACE "MyNamespace") 

      The example.proto doesn't define a namespace by itself.

       

      This appears to be an issue during configuration. I get the following CMake error:

      CUSTOMBUILD : CMake warning :  [C:\QtProtobufBug\cmake-build-vs\Protos_protobuf_registration.vcxproj]
          No source or binary directory provided.  Both will be assumed to be the
          same as the current working directory, but note that this warning will
          become a fatal error in future CMake releases. 
      
      CUSTOMBUILD : CMake error : The source directory "C:/QtProtobufBug/cmake-build-vs" does not appear to contain CMakeLists.txt. [C:\QtProtobufBug\cmake-build-vs\ProtosQt_protobuf_registration.vcxproj]
        Specify --help for usage, or press the help button on the CMake GUI.
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'C:\QtProtobufBug\cmake-build-vs\CMakeFiles\c7ecba44aba41b54ab3d249b776be745\bug.qpb.h.rule;C:\QtProtobufBug\CMakeLists.txt' exited with code 1. [C:\QtProtobufBug\cmake-build-vs\ProtobufsQt_protobuf_registration.vcxproj]

      I also found this bug, which looks similar: https://bugreports.qt.io/browse/QTBUG-116463

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tatiana.borisova Tatiana Borisova
            jdoubleu jdoubleu
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes