Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.0.0
-
-
9cd7d8306901946c3eeed3375940cee2949c1ba7 (qt/qtbase/dev)
Description
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.
Attachments
Issue Links
- resulted in
-
QTBUG-89412 Building with qmake uses wrong library name
-
- Closed
-
For Gerrit Dashboard: QTBUG-89467 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
327533,2 | CMake: Split .prl file generation into two stages | dev | qt/qtbase | Status: DEFERRED | -1 | 0 |
327877,6 | CMake: Refactor .prf files generation | dev | qt/qtbase | Status: ABANDONED | -1 | 0 |
342538,7 | Check if all required Qt targets are declared when finalizing the module | dev | qt/qtbase | Status: MERGED | +2 | 0 |
342778,2 | Rearrange sub-directory order | dev | qt/qtquicktimeline | Status: MERGED | +2 | 0 |