generic: add feature information about found X11 extensions

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-03-02 22:08:04 +02:00
parent cc205b981a
commit baf774783c
9 changed files with 26 additions and 41 deletions

View file

@ -7,8 +7,6 @@ include(GenerateExportHeader)
find_package(KDE4 4.19.0 REQUIRED)
include(KDE4Defaults)
option(WITH_XINERAMA "Xinerama support for multi-headed X displays" ON)
find_package(ZLIB)
set_package_properties(ZLIB PROPERTIES
DESCRIPTION "Support for gzip compressed files and data streams"
@ -83,10 +81,18 @@ if(Q_WS_X11)
TYPE REQUIRED
)
add_feature_info("Automated testing of X clients" X11_XTest_FOUND
"The X11 Testing Resource extension library is useful for automated testing of X clients")
add_feature_info("libXTest" X11_XTest_FOUND "The X11 Testing Resource extension library is useful for automated testing of X clients")
add_feature_info("libXau" X11_Xau_FOUND "The X11 Authorization Protocol library may be used by KDM")
add_feature_info("LibXdmcp" X11_Xdmcp_FOUND "The X Display Manager Control Protocol library may be used by KDM")
add_feature_info("libXdmcp" X11_Xdmcp_FOUND "The X Display Manager Control Protocol library may be used by KDM")
add_feature_info("libXcomposite" X11_Xcomposite_FOUND "The X11 Composite extension library may be used by Plasma and KWin")
add_feature_info("libXShm" X11_XShm_FOUND "The X11 shared-memory fences library may be used by ksplash")
add_feature_info("libxf86misc" X11_xf86misc_FOUND "The X11 miscellaneous library may be used by keyboard KCM") # TODO: unused?
add_feature_info("libdpms" X11_dpms_FOUND "The X11 extension library may be used by powerdevil")
add_feature_info("libXSync" X11_XSync_FOUND "The X11 synchronization may be used by KWin")
add_feature_info("libXinput" X11_Xinput_FOUND "The X11 XINPUT extension library may be used by keyboard KCM")
add_feature_info("libXft" X11_Xft_FOUND "The X11 font API library may be used by kfontinst KCM")
add_feature_info("libXinerama" X11_Xinerama_FOUND "The X11 XINERAMA extension library may be used by ksplash")
add_feature_info("libXRes" X11_XRes_FOUND "The X Resource library may be used by ksysguard")
if(NOT X11_Xdamage_FOUND)
message(FATAL_ERROR "The X11 damaged region extension library was not found. Required for compositing support in KWin.")

View file

@ -68,27 +68,20 @@ check_include_files(unistd.h HAVE_UNISTD_H)
check_include_files(malloc.h HAVE_MALLOC_H)
macro_bool_to_01(FONTCONFIG_FOUND HAVE_FONTCONFIG) # kcontrol/{fonts,kfontinst}
macro_bool_to_01(FREETYPE_FOUND HAVE_FREETYPE) # kcontrol/fonts
macro_bool_to_01(X11_XShm_FOUND HAVE_XSHM) # kwin, ksplash
macro_bool_to_01(X11_XShm_FOUND HAVE_XSHM) # ksplash
macro_bool_to_01(X11_XTest_FOUND HAVE_XTEST) # khotkeys, kxkb, kdm
macro_bool_to_01(X11_Xcomposite_FOUND HAVE_XCOMPOSITE) # kicker, kwin
macro_bool_to_01(X11_Xcomposite_FOUND HAVE_XCOMPOSITE) # plasma, kwin
macro_bool_to_01(X11_Xcursor_FOUND HAVE_XCURSOR) # many uses
macro_bool_to_01(X11_Xdamage_FOUND HAVE_XDAMAGE) # kwin
macro_bool_to_01(X11_Xfixes_FOUND HAVE_XFIXES) # klipper, kicker, kwin
if(X11_Xkbfile_FOUND)
macro_bool_to_01(X11_Xkb_FOUND HAVE_XKB) # kdm, kglobalaccel, kcontrol/keyboard
else()
set(X11_Xkb_FOUND 0)
endif()
if(WITH_XINERAMA)
macro_bool_to_01(X11_Xinerama_FOUND HAVE_XINERAMA)
else(WITH_XINERAMA)
set(HAVE_XINERAMA 0)
endif(WITH_XINERAMA)
macro_bool_to_01(X11_Xkb_FOUND HAVE_XKB) # kdm, kglobalaccel, kcontrol/keyboard
macro_bool_to_01(X11_Xinerama_FOUND HAVE_XINERAMA)
macro_bool_to_01(X11_Xrandr_FOUND HAVE_XRANDR) # kwin
macro_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER) # kcontrol/style, kicker
macro_bool_to_01(X11_xf86misc_FOUND HAVE_XF86MISC) # kdesktop and kcontrol/lock
macro_bool_to_01(X11_dpms_FOUND HAVE_DPMS) # kdesktop
macro_bool_to_01(X11_xf86misc_FOUND HAVE_XF86MISC) # kcontrol/keyboard
macro_bool_to_01(X11_dpms_FOUND HAVE_DPMS) # powerdevil
macro_bool_to_01(X11_XSync_FOUND HAVE_XSYNC) # kwin
macro_bool_to_01(X11_XRes_FOUND HAVE_XRES) # ksysguard
check_function_exists(setpriority HAVE_SETPRIORITY) # kscreenlocker

View file

@ -36,3 +36,6 @@
/* Define if you have XRandR 1.3 */
#cmakedefine HAS_RANDR_1_3 1
/* Define if you have the XRes extension */
#cmakedefine HAVE_XRES 1

View file

@ -65,13 +65,9 @@ target_link_libraries(krunner
${X11_LIBRARIES}
)
if(X11_Xsreensaver_FOUND)
target_link_libraries(krunner ${X11_Xsreensaver_LIB})
endif(X11_Xsreensaver_FOUND)
if(X11_Xcursor_FOUND)
target_link_libraries(krunner ${X11_Xcursor_LIB})
endif(X11_Xcursor_FOUND)
target_link_libraries(krunner ${X11_Xcursor_LIB})
endif()
install(TARGETS krunner ${INSTALL_TARGETS_DEFAULT_ARGS} )

View file

@ -1,2 +1 @@
#cmakedefine HAVE_LMSENSORS 1
#cmakedefine HAVE_XRES 1

View file

@ -1,18 +1,7 @@
configure_file(config-ksysguard.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ksysguard.h)
########### next target ###############
if(Q_WS_X11)
find_library(X11_XRes_LIB XRes ${X11_LIB_SEARCH_PATH})
find_path(X11_XRes_INCLUDE_PATH X11/extensions/XRes.h ${X11_INC_SEARCH_PATH})
if(X11_XRes_LIB AND X11_XRes_INCLUDE_PATH)
set(X11_XRes_FOUND TRUE)
endif(X11_XRes_LIB AND X11_XRes_INCLUDE_PATH)
endif(Q_WS_X11)
macro_bool_to_01(X11_XRes_FOUND HAVE_XRES)
configure_file(config-ksysguard.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ksysguard.h )
add_subdirectory( lsofui )
add_subdirectory( processcore )
add_subdirectory( processui )

View file

@ -7,6 +7,3 @@
/* Define to 1 if you have the <byteswap.h> header file. */
#cmakedefine HAVE_BYTESWAP_H 1
/* Define to 1 if you have the X11 xres file */
#cmakedefine HAVE_XRES 1

View file

@ -56,6 +56,7 @@ struct WindowInfo {
QString name;
};
#include "../config-ksysguard.h"
#include "config-X11.h"
#endif
namespace KSysGuard { class Processes; }

View file

@ -25,6 +25,7 @@
#include "ksysguardprocesslist.h"
#include "../config-ksysguard.h"
#include "config-X11.h"
#include <QApplication>
#include <QTimer>