~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to ksysguard/ksysguardd/CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
cmake_minimum_required(VERSION 2.6.2)
 
2
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/CContLib/ )
 
3
 
 
4
 
 
5
# Laurent: Verify that we install it into (kdeprefix)/etc/ and not into /etc
 
6
# otherwise it's necessary to change it.
 
7
# into kde 3.x it was installed into /etc/
 
8
add_definitions( -DKSYSGUARDDRCFILE=\"${SYSCONF_INSTALL_DIR}/ksysguarddrc\" )
 
9
 
 
10
add_definitions(-DOSTYPE_${CMAKE_SYSTEM_NAME})
 
11
 
 
12
macro_optional_find_package(Sensors)
 
13
macro_bool_to_01(SENSORS_FOUND HAVE_LMSENSORS)
 
14
 
 
15
check_include_files(sys/inotify.h SYS_INOTIFY_H_FOUND)
 
16
macro_bool_to_01(SYS_INOTIFY_H_FOUND HAVE_SYS_INOTIFY_H)
 
17
 
 
18
 
 
19
configure_file(config-ksysguardd.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ksysguardd.h)
 
20
 
 
21
if( ${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD" )
 
22
    add_subdirectory( "FreeBSD" )
 
23
    include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/FreeBSD )
 
24
else( ${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD" )
 
25
if( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )
 
26
    add_subdirectory( "FreeBSD" )
 
27
    include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/FreeBSD )
 
28
else( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )
 
29
    if( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
 
30
        add_subdirectory( "Solaris" )
 
31
        include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/Solaris )
 
32
    else( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
 
33
        add_subdirectory( ${CMAKE_SYSTEM_NAME} )
 
34
        include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_SYSTEM_NAME} )
 
35
    endif( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
 
36
endif( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )
 
37
endif( ${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD" )
 
38
 
 
39
########### next target ###############
 
40
 
 
41
    set(libccont_SRCS 
 
42
        ${CMAKE_CURRENT_SOURCE_DIR}/CContLib/ccont.c )
 
43
 
 
44
    set(ksysguardd_SRCS ${libccont_SRCS}
 
45
        Command.c 
 
46
        conf.c 
 
47
        ksysguardd.c 
 
48
        PWUIDCache.c )
 
49
 
 
50
    add_executable(ksysguardd ${ksysguardd_SRCS})
 
51
 
 
52
    target_link_libraries(ksysguardd libksysguardd)
 
53
 
 
54
   if( NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR NOT ${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD" )
 
55
      target_link_libraries(ksysguardd ${KDE4_KDEFAKES_LIBS})
 
56
   endif( NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR NOT ${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD" )
 
57
 
 
58
if( ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD" )
 
59
  message(STATUS "Adding kvm library on NetBSD")
 
60
  target_link_libraries(ksysguardd kvm)
 
61
endif( ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD" )
 
62
if( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )
 
63
  message(STATUS "Adding kinfo library on DragonFly BSD")
 
64
  target_link_libraries(ksysguardd kinfo)
 
65
endif( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )
 
66
if( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
 
67
  target_link_libraries(ksysguardd socket nsl)
 
68
endif( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
 
69
 
 
70
install(TARGETS ksysguardd ${INSTALL_TARGETS_DEFAULT_ARGS})