I'm working on Windows 10.
I had a static version of Qt that I compiled fresh from https://download.qt.io/archive/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.zip
with the configuration options "-commerical -no-accessibility -nomake examples -debug-and-release -platform win32-g++ -static -qt-libjpeg -opengl desktop"
For the compiler, I use a MinGW 64 (GNU Make 4.1 built for i686-w64-mingw32), although the compiler should not be relevant here.
With that, I wanted to build VTK 8.1.1 (I also tested other versions), with it's Qt classes (the VTK_Group_Qt flag in VTK). Generating the VTK Makefile using the CMake GUI failed, saying
The imported target "Qt5::Core" references the file
but this file does not exist. Possible reasons include:
- The file was deleted, renamed, or moved to another location.
- An install or uninstall procedure did not complete successfully.
- The installation package was faulty and contained
but not all the files it references
Obviously, the path where it searches mkspecs is wrong, it acts as if the qtbase folder would not exist and everything was in it's parent folder.
I originally thought that VTK was the problem here, or better to say incompatibilities of versions, and asked this as a question on SO:
Then I took a look at one particular cmake file that the Qt configuration created:
The file contained a single line:
which I changed to
and everything worked.
I thought that maybe I made a mistake while configuring Qt, but taking a look at the options I used above, I don't see where it could be. Another user on SO suggested that it might be an actual bug in Qt, which is why I came here.