Here is the problem I am struggling with.
I am using CMake to build my Qt5 GUI project. I am using a custom module QML-material project from GitHub.
The problem is that as it is said in the project documentation - in order to setup the module for your project, you should add a definition:
But if this definition is added in CMakeLists.txt the project can’t find C++ STD library. If I comment it out the STD features can be used again.
About the definition meaning.
This macro basically calls addImportPath(“qec:/”) to the argument it is called with. In my case it is in main():
// Working example QQmlApplicationEngine engine; QPM_INIT(engine);
But if I just change it and call addImportPath straight forward and remove the definition it doesn’t find the custom QML modules.
// Not working example QQmlApplicationEngine engine; engine.addImportPath(QStringLiteral("qrc:/"));
- Why a definition in CMake can block the project linking with the STD lib?
- Why if I replace the macro with its representation in the main() function it doesn’t work?
- Does anyone have a proposal how to use both the custom module and the STD library together?
NB! The Qt libraries are still visible. The problem is only with the STD.