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

mocinclude target needs "fix_target" in mocinclude.CONFIG in specific directory layouts

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.7.4
    • Build tools: qmake
    • None
    • Windows Vista,
      can also be reproduced on Linux when using the win32-msvc2010 spec explicitly and of course only by visual inspection.

      Please see the attached example.

      • unpack file
      • cd mocinclude-bug\subdir
      • qmake -spec win32-msvc2010
      • nmake

      will complain about not knowing how to make ../build/moc/mocinclude.tmp

      Reason: Rule for mocinclude.tmp specifies an absolute path (see mocinclude-bug/build.pri) while dependent rules specify a relative path

      Solution:

      • edit subdir.pro, uncomment "mocinclude.CONFIG *= fix_target"
      • nmake qmake
      • nmake

      Now compiles fine.

      I suggest to put "mocinclude.CONFIG += fix_target" into mkspecs/features/moc.prf by default, because it seems to make the dependency and target paths consistent.

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

            buddenha Oswald Buddenhagen
            tvogel Tilman Vogel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes