解决KDE6圆角插件编译失败问题(Gentoo)
7
2026-02-18
LightlyShaders 插件作为提供圆角和虚化的非官方插件,在V3.0.0版本推出了对于KDE6的支持。但是在编译安装的过程中,还是遇到了不少问题,花费了我很多时间。
缺少Qt6::CorePrivate依赖
报错如下:
CMake Error at src/lightlyshaders/CMakeLists.txt:15 (target_link_libraries):
Target "kwin_effect_lightlyshaders" links to:
Qt6::CorePrivate
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
CMake Error at src/lightlyshaders/kcm/CMakeLists.txt:11 (target_link_libraries):
Target "kwin_lightlyshaders_config" links to:
Qt6::CorePrivate
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
CMake Error at src/liblshelper/CMakeLists.txt:15 (target_link_libraries):
Target "lshelper" links to:
Qt6::CorePrivate
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
解决方法:
在目录的CMakeLists.txt文件中,添加所需要的依赖库。通常来讲Gentoo的依赖库是非常齐全的,只是有时候不写进去他就不会自动获取。
# CMakeLists.txt
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Gui
Core
CorePrivate
DBus
UiTools
Widgets
OpenGL
Network
Xml
)Wayland编译支持
当前版本已经在main分支解决,从plasma6分支checkout过去即可