Manually configuring shadow build in qmake

后端 未结 2 2034
半阙折子戏
半阙折子戏 2021-02-12 18:21

There is a feature I really like in qt creator and it is the Shadow build. When the Shadow Build is on, all the generated files (*.moc, Makefile, *.o) will be generated in a giv

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-12 19:02

    AFAIK what QtCreator does, basically boils down to this:

     mkdir my_shadow_build
     cd my_shadow_build
     qmake ../my_src_dir
    

    this creates the Makefile itself in the build directory and simply running

     make
    

    there creates all temporary files under the build directory, using the sources from the original directory. This does not require any special stuff in the .pro file but just depends on the usage "from the outside".

提交回复
热议问题