OlivierLDff / Qaterial

🧩 Collection of Material Components based on QtQuickControls2.
https://olivierldff.github.io/Qaterial/
MIT License
291 stars 54 forks source link

CMake error with QtCreator #112

Closed makerinchina-iot closed 3 years ago

makerinchina-iot commented 3 years ago

Hello, I use QtCreator to build Qaterial, but there are many errors like this: (I have used Qtcreator to create CMake Quick test project and it's work fine.)

` CMake Error at CMakeLists.txt:180 (add_library): Target "Qaterial" links to target "Qt::Core" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Error at CMakeLists.txt:180 (add_library): Target "Qaterial" links to target "Qt::Gui" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Error at CMakeLists.txt:180 (add_library): Target "Qaterial" links to target "Qt::Svg" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? `

Pls help.

OlivierLDff commented 3 years ago

I only support Qaterial for Qt 5.15 which support versionneless qt target for cmake (https://www.qt.io/blog/versionless-cmake-targets-qt-5.15). Upgrade to Qt5.15 or replace Qt:: with Qt5::

makerinchina-iot commented 3 years ago

Thannks for your help.