How do I keep my Qt C++ program from opening a console in Windows?

后端 未结 5 1989
有刺的猬
有刺的猬 2021-02-19 10:10

I\'m making an application in Qt Creator, with cmake and MinGW as compiler. I\'ve seen this question being answered for other people, but they used regular Qt projects with .pro

5条回答
  •  萌比男神i
    2021-02-19 10:59

    This is an old question, but anyways, there is a better solution than all of the other ones posted here:

    CMAKE_POLICY(SET CMP0020 NEW)
    

    Adding this will automatically handle everything for you. CMake should actually output a warning if you don't set this policy, at least that's how I learned of its existence.

提交回复
热议问题