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 | |
parent | 54ebc6da596d3664170e0537e444ba6879fb2af7 (diff) | |
download | tdebase-84d73a40b2cca0c3f6cac9e50712cb51cbc1b648.tar.gz tdebase-84d73a40b2cca0c3f6cac9e50712cb51cbc1b648.zip |
Add lm_sensors optional support for ksysguard
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-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 |
5 files changed, 30 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ebb51433..da54b40b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,6 +81,7 @@ option( WITH_XDMCP "xdmcp support for tdm" ${WITH_ALL_OPTIONS} ) option( WITH_XINERAMA "Enable xinerama extension support" ${WITH_ALL_OPTIONS} ) option( WITH_ARTS "Enable aRts support" ${WITH_ALL_OPTIONS} ) option( WITH_I8K "Enable Dell laptop support (ksysguard)" ${WITH_ALL_OPTIONS} ) +option( WITH_SENSORS "Enable lm_sensors support (ksysguard)" ${WITH_ALL_OPTIONS} ) option( WITH_HAL "Enable HAL support" ${WITH_ALL_OPTIONS} ) option( WITH_TDEHWLIB "Enable TDE hardware library support" OFF ) option( WITH_UPOWER "Enable UPOWER support" ${WITH_ALL_OPTIONS} ) @@ -112,6 +113,7 @@ option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" # WITH_XINERAMA affects ksplashml # WITH_ARTS affects libkonq khotkeys # WITH_I8K affects ksysguard +# WITH_SENSORS affects ksysguard # WITH_HAL affects tdeioslaves(media) ksmserver # WITH_TDEHWLIB affects tdeioslaves(media), replaces WITH_HAL on systems without HAL # WITH_LIBRAW1394 affects kcontrol(view1394) 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 |