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

.prl file generation is dependent on add_subdirectory order

XMLWordPrintable

      This is the root cause for QTBUG-89412.

      Suppose you have two Qt modules:

      add_subdirectory(3dextras)
      add_subdirectory(3dinput)
      

      and 3dextras depends on 3dinput such that the path to 3dinput's library appears in QMAKE_PRL_LIBS in the generated .prl file of 3dextras.

      This currently doesn't work, because

      • qt_generate_prl_file is called via scope finalizer "at the end of the sub-project file"
      • add_subdirectory immediately evaluates the project file
      • add_subdirectory(3dextras) does not see the targets that are created for 3dinput.

      The work-around is to simply switch the order of the add_subdirectory calls:

      add_subdirectory(3dinput)
      add_subdirectory(3dextras)
      

      The real fix is probably to move the qt_generate_prl_file call to QtPostProcess.cmake.

        For Gerrit Dashboard: QTBUG-89467
        # Subject Branch Project Status CR V

            semlanik Alexey Edelev
            jbornema Joerg Bornemann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes