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

qmake's MSVC generator cannot find subprojects in out-of-source builds

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.0 RC
    • 5.5.1
    • Build tools: qmake
    • None
    • I've tested it against 5.5.1, but it is the same behavior with 5.4 and 5.6 installers.
    • 8b8e8a33b35ed7307b95172f9602b458d1b71bc8

    Description

      When creating a project structure

      project.pro (subdirs)
      |-- src.pro (subdirs)
          |-- lib1.pro (lib)
          |-- lib2.pro (lib)
          |-- plugins.pro (subdirs)
              |-- plugin1.pro (lib)
              |-- plugin2.pro (lib)
      [...]
      

      and trying to produce a MSVC solution as out-of-source build, the subprojects are not found and not added to the root solution file.

      The reason seems to be that the *.vcxproj are produced in the build folder but qmake is looking for them in the source folder. If running the generation inside the source folder, everything works perfectly.

      Attached is a small example to reproduce the issue. Just run the commands:

      mkdir build && cd build
      qmake -tp vc -spec win32-msvc2013 -r ..\qmake_msvc_generator\project.pro
      

      as out of source build and you will see warnings like this:

      WARNING: Ignored (not found) 'D:/projects/tests/qmake_msvc_generator/samples/sample1\sample1.vcxproj'
      WARNING: Ignored (not found) 'D:/projects/tests/qmake_msvc_generator/samples/sample2\sample2.vcxproj'
      WARNING: Ignored (not found) 'D:/projects/tests/qmake_msvc_generator/src/plugins/plugin1\plugin1.vcxproj'
      WARNING: Ignored (not found) 'D:/projects/tests/qmake_msvc_generator/src/plugins/plugin2\plugin2.vcxproj'
      WARNING: Ignored (not found) 'D:/projects/tests/qmake_msvc_generator/src/tools/tool1\tool1.vcxproj'
      WARNING: Ignored (not found) 'D:/projects/tests/qmake_msvc_generator/src/tools/tool2\tool2.vcxproj'
      

      As you can see it is looking into the wrong folder.

      Attachments

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

        Activity

          People

            jbornema Joerg Bornemann
            rolandwinklmeier Roland Winklmeier
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes