diff options
author | Alexander Golubev <fatzer2@gmail.com> | 2013-08-27 06:21:51 +0400 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-09-08 10:50:40 +0200 |
commit | 84d73a40b2cca0c3f6cac9e50712cb51cbc1b648 (patch) | |
tree | a019d70bdb17c8d56499d9f704d323e074178db1 /ksysguard | |
parent | 54ebc6da596d3664170e0537e444ba6879fb2af7 (diff) | |
download | tdebase-84d73a40b2cca0c3f6cac9e50712cb51cbc1b648.tar.gz tdebase-84d73a40b2cca0c3f6cac9e50712cb51cbc1b648.zip |
Add lm_sensors optional support for ksysguard
Diffstat (limited to 'ksysguard')
-rw-r--r-- | ksysguard/CMakeLists.txt | 2 | ||||
-rw-r--r-- | ksysguard/ksysguardd/CMakeLists.txt | 4 | ||||
-rw-r--r-- | ksysguard/ksysguardd/ConfigureChecks.cmake | 21 | ||||
-rw-r--r-- | ksysguard/ksysguardd/Linux/CMakeLists.txt | 4 |
4 files changed, 28 insertions, 3 deletions
diff --git a/ksysguard/CMakeLists.txt b/ksysguard/CMakeLists.txt index 9beeeb971..daf75d377 100644 --- a/ksysguard/CMakeLists.txt +++ b/ksysguard/CMakeLists.txt @@ -9,8 +9,6 @@ # ################################################# -# FIXME no support for lm_sensors yet - add_subdirectory( CContLib ) add_subdirectory( ksysguardd ) add_subdirectory( gui ) diff --git a/ksysguard/ksysguardd/CMakeLists.txt b/ksysguard/ksysguardd/CMakeLists.txt index 030700f49..9ec73cc93 100644 --- a/ksysguard/ksysguardd/CMakeLists.txt +++ b/ksysguard/ksysguardd/CMakeLists.txt @@ -11,13 +11,14 @@ # FIXME there is only Linux support +include( ConfigureChecks.cmake ) + if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" ) set( OS_SPECIFIC_DIR Linux ) else() tde_message_fatal( "Your operating system (${CMAKE_SYSTEM_NAME}) is not supported yet." ) endif() - add_subdirectory( ${OS_SPECIFIC_DIR} ) @@ -39,5 +40,6 @@ include_directories( tde_add_executable( ksysguardd AUTOMOC SOURCES Command.c conf.c ksysguardd.c PWUIDCache.c LINK ccont-static ksysguardd-static ${TDE_LIB_DIR}/libtdefakes_nonpic.a + ${SENSORS_LIBRARIES} DESTINATION ${BIN_INSTALL_DIR} ) diff --git a/ksysguard/ksysguardd/ConfigureChecks.cmake b/ksysguard/ksysguardd/ConfigureChecks.cmake new file mode 100644 index 000000000..529a89fbe --- /dev/null +++ b/ksysguard/ksysguardd/ConfigureChecks.cmake @@ -0,0 +1,21 @@ +################################################# +# +# (C) 2013 Alexander Golubev +# fatzer2 (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +# lm_sensors +if( WITH_SENSORS ) + check_include_file( "sensors/sensors.h" HAVE_SENSORS_SENSORS_H ) + check_library_exists( sensors sensors_init "" HAVE_SENSORS_LIB ) + if( HAVE_SENSORS_SENSORS_H AND HAVE_SENSORS_LIB ) + set( SENSORS_LIBRARIES sensors ) + else( ) + tde_message_fatal( "lm_sensors are required, but not found on your system" ) + endif( ) +endif( WITH_SENSORS ) diff --git a/ksysguard/ksysguardd/Linux/CMakeLists.txt b/ksysguard/ksysguardd/Linux/CMakeLists.txt index b0cff4205..f1b02080c 100644 --- a/ksysguard/ksysguardd/Linux/CMakeLists.txt +++ b/ksysguard/ksysguardd/Linux/CMakeLists.txt @@ -15,6 +15,10 @@ if( WITH_I8K ) add_definitions( -DHAVE_I8K_SUPPORT ) endif() +if( WITH_SENSORS ) + add_definitions( -DHAVE_SENSORS_SENSORS_H ) +endif() + include_directories( ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/ksysguard/CContLib |