Adding custom target in qmake

后端 未结 1 1554
迷失自我
迷失自我 2021-01-06 13:43

I want to build my resources with qmake as follows [Qt 5.5]:

imageTarget.target = images.rcc
imageTarget.depends = $$PWD/images.qrc
imageTarget.commands = r         


        
相关标签:
1条回答
  • 2021-01-06 14:08

    With

    QMAKE_EXTRA_TARGETS += imageTarget
    

    you just define a new target - but it is not automatically built when running make.

    Try to add

    PRE_TARGETDEPS += images.rcc
    

    This should automatically build a new images.rcc when running make if images.qrc has changed.

    0 讨论(0)
提交回复
热议问题