From 4bbaa90f2a120e420322b45a67c3fbd0b28f9091 Mon Sep 17 00:00:00 2001 From: aneejit1 Date: Wed, 17 Jun 2020 21:45:21 +0000 Subject: Improve detection of libXss, OpenGL and libXext DPMS support. The detection of libXss has been changed to ask the question "where is libXss?" before asking "is XScreenSaverQueryInfo available?" rather than the other way around. The test for "XScreenSaverQueryInfo" also ensures that the include and library flags from pkg-config are used. The OpenGL test has been amended to make use of the include paths and library flags returned by pkg-config to prevent the test from failing when OpenGL is not in /usr. The libXext test in kcontrol/energy/CMakeLists.txt is amended to use the libXext include path and library flags. The paths are also added to the include/link directories. Signed-off-by: aneejit1 (cherry picked from commit 7fba97e18aa453c76130f587740f692cd267a216) --- kcontrol/energy/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'kcontrol/energy') diff --git a/kcontrol/energy/CMakeLists.txt b/kcontrol/energy/CMakeLists.txt index 9e194602a..b9f2f9958 100644 --- a/kcontrol/energy/CMakeLists.txt +++ b/kcontrol/energy/CMakeLists.txt @@ -16,6 +16,8 @@ if( WITH_DPMS ) include( CheckCSourceCompiles ) set( CMAKE_REQUIRED_LIBRARIES Xext ) + set( CMAKE_REQUIRED_INCLUDES "${XEXT_INCLUDE_DIRS}" ) + set( CMAKE_REQUIRED_FLAGS "${XEXT_LDFLAGS}" ) check_c_source_compiles(" #include @@ -45,10 +47,12 @@ include_directories( ${CMAKE_BINARY_DIR} ${TDE_INCLUDE_DIR} ${TQT_INCLUDE_DIRS} + ${XEXT_INCLUDE_DIRS} ) link_directories( ${TQT_LIBRARY_DIRS} + ${XEXT_LIBRARY_DIRS} ) ##### other data ################################ @@ -60,6 +64,7 @@ install( FILES energy.desktop DESTINATION ${APPS_INSTALL_DIR}/.hidden ) tde_add_kpart( kcm_energy AUTOMOC SOURCES energy.cpp - LINK tdeio-shared ${XEXT_LIBRARY} + LINK tdeio-shared + LINK_PRIVATE ${XEXT_LIBRARY} DESTINATION ${PLUGIN_INSTALL_DIR} ) -- cgit v1.2.1