Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Widgets target is mentioned as a dependency for fluentuiplugin, but not declared. #536

Open
AKA-LinCoder opened this issue Jul 11, 2024 · 7 comments

Comments

@AKA-LinCoder
Copy link

使用最新的脚手架创建项目 报错

@AKA-LinCoder
Copy link
Author

C:\222\Estim\Desktop\Nice\src\CMakeLists.txt:77: error: The Widgets target is mentioned as a dependency for fluentuiplugin, but not
declared.

Call stack:
C:/Users/xxx/Desktop/Nice/src/CMakeLists.txt:77 (qt_finalize_executable)
E:/Qt/6.7.2/mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:877 (qt6_finalize_target)
E:/Qt/6.7.2/mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:774 (_qt_internal_finalize_executable)
E:/Qt/6.7.2/mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:651 (__qt_internal_collect_all_target_dependencies)
E:/Qt/6.7.2/mingw_64/lib/cmake/Qt6/QtPublicWalkLibsHelpers.cmake:311 (__qt_internal_walk_libs)
E:/Qt/6.7.2/mingw_64/lib/cmake/Qt6/QtPublicWalkLibsHelpers.cmake:259 (message)

@cfscn
Copy link

cfscn commented Jul 15, 2024

解决了吗? 同问题

@wxwsir
Copy link

wxwsir commented Jul 19, 2024

同问题

@cynosure279
Copy link

之前遇到了这个问题,需要修改cmake。
建议不使用脚手架,直接使用QtCreator创建项目,然后直接在qml里import FluentUI。
如果之前编译过了这个项目,那么编译产物会自动存放在Qt SDK里,这样就可以直接import而无需修改cmake。

@Arndt-MBE
Copy link

I cannot read this (and didn't bother to get a machine translation), but setting CMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON in CMake solved a similar issue for me. I came here looking for a solution earlier, so maybe it is of help for you. (I'm guessing though, because there is not much information.)

@AKA-LinCoder
Copy link
Author

AKA-LinCoder commented Aug 9, 2024 via email

@RayAndAmanda
Copy link

在CMakeLists.txt文件改变一下加载顺序应该可以 。
add_subdirectory(src)
add_subdirectory(FluentUI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants