zhuzichu520 / FluentUI

FluentUI for QML
MIT License
3.14k stars 419 forks source link

Dependency warning - invalid scope #480

Open ArmynC opened 2 months ago

ArmynC commented 2 months ago

After initial build(s) (via CMake) in a rather random manner, the project outputs the dependency warning:

C:\Qt\6.7.0\mingw_64\lib\cmake\Qt6Core\Qt6CoreMacros.cmake:743:EVAL:1: warning: The qml plugin 'fluentuiplugin' 
is a dependency of the project, but the link target it defines (fluentuiplugin) does not exist in the current scope.  
The plugin will not be linked.

Call stack:
   C:/Qt/6.7.0/mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:743:EVAL:1 (qt6_finalize_target)
   C:/Qt/6.7.0/mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:774 (_qt_internal_finalize_executable)
   C:/Qt/6.7.0/mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:678 (cmake_language)
   C:/Qt/6.7.0/mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:678 (qt6_import_qml_plugins)
   C:/Qt/6.7.0/mingw_64/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:3393 (message)

The executed app isn't affected. It is able to run.

The root CMake has the policy set to 2.22 and the CXX standard is set at 17.

Running MinGW on Qt Creator.

Thanks!

EDIT

By nesting the UI component directory within the src directory (containing core application files like main.cpp), the observed issue should be mitigated. This is likely due to conflicts arising when the UI and src directories share the same parent directory.

zengdapang commented 2 months ago

我在使用Qt6.7之后也遇到这个现象,还不太清楚是什么机制。