meson: Handling Qt5 resource files results in ninja dependency errors

This directora structure for the given Qt sub project: https://github.com/Framstag/libosmscout/tree/master/OSMScout2

As you can see there is a res.qrc in the top-level directory (though the OSMScout2 application is only a sub directory of the full project). The file references actual resources in the res sub directory.

Now a meson debug call and ninja call in the created debug directory results in:

ninja: error: '../OSMScout2/OSMScout2/pics/Search.svg', needed by 'OSMScout2/qt5-res_qrc.cpp', missing and no known rule to make it

Looking at the build.ninja one sees:

build OSMScout2/qt5-res_qrc.cpp: CUSTOM_COMMAND ../OSMScout2/./res.qrc | ../OSMScout2/OSMS
cout2/./pics/Search.svg ../OSMScout2/OSMScout2/./qml/custom/LocationSearch.qml ../OSMScout
2/OSMScout2/./pics/Download.svg ../OSMScout2/OSMScout2/./qml/custom/MapDialog.qml ../OSMSc
out2/OSMScout2/./qml/custom/LineEdit.qml ../OSMScout2/OSMScout2/./pics/DeleteText.svg ../O
SMScout2/OSMScout2/./resources/online-tile-providers.json ../OSMScout2/OSMScout2/./pics/Mi
nus.svg ../OSMScout2/OSMScout2/./qml/custom/MapButton.qml ../OSMScout2/OSMScout2/./qml/cus
tom/DialogActionButton.qml ../OSMScout2/OSMScout2/./qml/main.qml ../OSMScout2/OSMScout2/./
qml/SearchDialog.qml ../OSMScout2/OSMScout2/./qml/custom/ScrollIndicator.qml ../OSMScout2/
OSMScout2/./resources/map-providers.json ../OSMScout2/OSMScout2/./qml/MapDownloadDialog.qm
l ../OSMScout2/OSMScout2/./pics/Route.svg ../OSMScout2/OSMScout2/./qml/AboutDialog.qml ../
OSMScout2/OSMScout2/./pics/Plus.svg /usr/local/Cellar/qt/5.10.0/bin/rcc
 COMMAND = /usr/local/Cellar/qt/5.10.0/bin/rcc -name res -o OSMScout2/qt5-res_qrc.cpp ../OSMScout2/./res.qrc
 description = Generating$ qt5-res_qrc$ with$ a$ custom$ command.

For me it looks like meson gets into problems with the actual directory structure and claims (resource) files being positioned in directories more “up” in the directory structure then they actually are.

An (simple) workaround would be helpful (since builds break now), I can also try to test (simple) patches to test potential fixes.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

This is with meson 0.44.0, 0.43.0 worked without problems.