1

i got a problem while switching from qbs 1.5 to 1.8. I have 'BaseProduct' in 'src/qbs/imports/BaseProduct.qbs' and i have product derived from it in 'src/derived/DerivedProduct.qbs'

In BaseProduct i have something like:

      Group {
        id: h
        name: 'h';
        Properties {
          prefix: '**/';
          files: ['*.h']
        }
      }

      Group {
        id: cpp
        name: 'cpp';
        Properties {
          prefix: '**/';
          files: ['*.cpp']
        }
      }

which automatically adds all sources from Derived.qbs directory to project. Worked in 1.5 but not in 1.8. If i add to prefix 'sourceDirectory + "/"' it almost works: files are added to subproject but additionally grouped under absolute paths like '/absolute/path/to/src/subproject'.

So project structure i got:

1.5 with "prefix: '**/'" [what i want to achive]

DerivedProduct

     - [cpp]
       - [subdir]
         - file_from_subdir.cpp
       - file_from_root_dir.cpp

1.8 with "prefix: '**/'" [cannot build project because there are not sources added to it]


    - [cpp]

1.8 with "prefix: 'sourceDirectory + '/**/'" [can build project but ugly absolute paths in groups occurs]

DerivedProduct

     - [cpp]
       - [/absolute/path/to/src/subproject]
         - [subdir]
           - file_from_subdir.cpp
          - file_from_src_root_dir.cpp

So how can i achieve 'auto group sources' functionality of 1.5 in 1.8 without copy/pasting group items to each subproject and of course without absolute path subgroup?

AustinPowers
  • 145
  • 8

1 Answers1

0

Can you explain what you mean by "ugly absolute paths in groups"? All files are resolved to absolute paths when loading a project. Are you talking about how it's displayed in Qt Creator?

  • Yes im about qtcreator. It is the only ide i know which support qbs. – AustinPowers Jun 17 '17 at 10:29
  • I suggest you file a bug report. Please attach a minimal (but complete) example project that exhibits the problem, and possibly a screenshot that shows the "ugly" Qt Creator project tree. – Christian Kandeler Jul 11 '17 at 23:15