File: CMakeLists.txt

package info (click to toggle)
kde-workspace 4:4.11.13-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 67,756 kB
  • ctags: 47,705
  • sloc: cpp: 358,638; ansic: 34,695; xml: 5,231; perl: 1,598; sh: 1,307; ruby: 1,135; python: 651; asm: 566; makefile: 37
file content (72 lines) | stat: -rw-r--r-- 2,798 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
  cmake_minimum_required(VERSION 2.6.2)
endif()

include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/CContLib/ )

# Laurent: Verify that we install it into (kdeprefix)/etc/ and not into /etc
# otherwise it's necessary to change it.
# into kde 3.x it was installed into /etc/
add_definitions( -DKSYSGUARDDRCFILE="\\"${SYSCONF_INSTALL_DIR}/ksysguarddrc\\"" )

add_definitions(-DOSTYPE_${CMAKE_SYSTEM_NAME})

macro_optional_find_package(Sensors)
macro_bool_to_01(SENSORS_FOUND HAVE_LMSENSORS)

check_include_files(sys/inotify.h SYS_INOTIFY_H_FOUND)
macro_bool_to_01(SYS_INOTIFY_H_FOUND HAVE_SYS_INOTIFY_H)


configure_file(config-ksysguardd.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ksysguardd.h)

if( ${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD" )
    add_subdirectory( "FreeBSD" )
    include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/FreeBSD )
else( ${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD" )
if( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )
    add_subdirectory( "FreeBSD" )
    include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/FreeBSD )
else( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )
    if( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
        add_subdirectory( "Solaris" )
        include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/Solaris )
    else( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
        add_subdirectory( ${CMAKE_SYSTEM_NAME} )
        include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_SYSTEM_NAME} )
    endif( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
endif( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )
endif( ${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD" )

########### next target ###############

    set(libccont_SRCS 
        ${CMAKE_CURRENT_SOURCE_DIR}/CContLib/ccont.c )

    set(ksysguardd_SRCS ${libccont_SRCS}
        Command.c 
        conf.c 
        ksysguardd.c 
        PWUIDCache.c )

    add_executable(ksysguardd ${ksysguardd_SRCS})

    target_link_libraries(ksysguardd libksysguardd)

   if( NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR NOT ${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD" )
      target_link_libraries(ksysguardd ${KDE4_KDEFAKES_LIBS})
   endif( NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR NOT ${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD" )

if( ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD" )
  message(STATUS "Adding kvm library on NetBSD")
  target_link_libraries(ksysguardd kvm)
endif( ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD" )
if( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )
  message(STATUS "Adding kinfo library on DragonFly BSD")
  target_link_libraries(ksysguardd kinfo)
endif( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )
if( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
  target_link_libraries(ksysguardd socket nsl)
endif( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )

install(TARGETS ksysguardd ${INSTALL_TARGETS_DEFAULT_ARGS})