Remove depends for libkysdk-system

This commit is contained in:
liudun 2024-01-26 16:16:05 +08:00 committed by xibowen
parent cfbdcac20b
commit 5cc4c4b72f
3 changed files with 13 additions and 1 deletions

1
debian/control vendored
View File

@ -9,7 +9,6 @@ Build-Depends: cmake,
debhelper-compat (= 13),
libglib2.0-dev,
libgsettings-qt-dev,
libkysdk-system-dev,
libopencv-dev,
libpam-dev,
libpolkit-qt5-1-dev,

View File

@ -3,7 +3,12 @@ project(ukui-polkit-agent)
pkg_check_modules(QGS REQUIRED gsettings-qt)
#pkg_search_module(GSETTINGS_QT REQUIRED gsettings-qt)
pkg_check_modules(KDKINFO REQUIRED kysdk-sysinfo)
if (KDKINFO_FOUND)
add_definitions(-DKEKINFO_FOUND="true")
endif()
#pkg_search_module(KDKINFO REQUIRED kysdk-sysinfo)
find_package(PolkitQt5-1 REQUIRED 0.103.0)

View File

@ -54,7 +54,11 @@ PolkitListener::~PolkitListener()
bool PolkitListener::isMavis()
{
#ifdef KDK_INFOFOUND
char *prjName = kdk_system_get_projectName();
#else
char *prjName;
#endif
if (prjName) {
QString strFeature = QString(prjName);
free(prjName);
@ -70,7 +74,11 @@ bool PolkitListener::isMavis()
bool PolkitListener::isSupportTableMode()
{
#ifdef KDK_INFOFOUND
unsigned int nFeature = kdk_system_get_productFeatures();
#else
unsigned int nFeature;
#endif
if (nFeature&0x02) { // 支持平板模式
return true;
}