Building Qt5 Quick project without Qt Creator via CMake

前端 未结 1 1589
感情败类
感情败类 2021-01-17 01:25

Im trying to build simple Qt Quick project and want to work with it outside Qt Creator. It means coding, building and running program only with tools like

相关标签:
1条回答
  • 2021-01-17 01:28

    The main problem, why "First attempt" failed is because Qt5 installed itself in ~/Qt and CMake searched for *.cmake configuration files in /usr/lib/x86_64-linux-gnu/cmake/ (I didn't metion that i use Ubuntu 16 LTS, which have cmake 3.5.1 preinstalled).

    So the way to solve this problem was to copy everything that was in

    ~/Qt/*last cmake version*/gcc_64 (in my case ~/Qt/5.13.0/gcc_64)

    into /usr/lib/ via sudo cp -a ~/Qt/5.13.0/gcc_64/* /usr/lib/


    The answer to second is short:

    This happend because by default Qt Creator sets CMake output into Ninja makefiles.

    Go to Tools > Options > Kits and add desired configuration or edit existing.

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