[Qt-creator] Qt Creator not loading CMake project

Davide Coppola vivaladav at gmail.com
Thu Feb 27 13:32:42 CET 2020


I have been struggling with a CMake project and Qt Creator for a while and
I was wondering if any CMake expert in your dev team could help me to
figure out what's going on.

This project has a root directory containing a main CMakeLists.txt and
several sub-dirs each with their own file.

Everything is fine and a Makefile is generated if I run from the command

cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..

Things don't go so well when I try to open the main CMakeLists.txt with
QtCreator... I get an error from the first execution of find_package() in a

Something I noticed is that the CMakeCache.txt file in build/ is missing a
lot of entries compared to the one generated when running CMake from the
command line. Once again, no idea why.

I assume CMake gets a different environment when running in QtCreator
compared to the one when executed from the command line, but I have no idea
how to fix that.

Any suggestions?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20200227/14981f81/attachment.html>

More information about the Qt-creator mailing list