How to execute shell command after compile finished from .pro in QT?

后端 未结 4 721
醉话见心
醉话见心 2020-12-01 12:40

What changes must I make to the .pro file if I want to execute chmod command, execute the output binary file, or do some other operations.

4条回答
  •  借酒劲吻你
    2020-12-01 13:03

    Another way to make things in given order is to use empty "super" target:

    super.depends = target_pre first target_post
    QMAKE_EXTRA_TARGETS += super
    

    Where first - is default qmake target, and target_pre and target_post some custom targets. Now make super just do the thing.

    EDIT: looks like in last versions of Qt build of dependencies is running in paralell so this solution wouldn't work.

提交回复
热议问题