summaryrefslogtreecommitdiffstats
path: root/kcontrol/energy
diff options
context:
space:
mode:
authoraneejit1 <aneejit1@gmail.com>2020-06-17 21:45:21 +0000
committeraneejit1 <aneejit1@gmail.com>2020-06-19 16:11:20 +0000
commit7fba97e18aa453c76130f587740f692cd267a216 (patch)
tree42dc1d38636245e29b5e6f305056a47be4a63d2e /kcontrol/energy
parent92902053e5ea081619e14eb5b1fc5d527e4f6136 (diff)
downloadtdebase-7fba97e18aa453c76130f587740f692cd267a216.tar.gz
tdebase-7fba97e18aa453c76130f587740f692cd267a216.zip
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 <aneejit1@gmail.com>
Diffstat (limited to 'kcontrol/energy')
-rw-r--r--kcontrol/energy/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
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 <sys/types.h>
@@ -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}
)