summaryrefslogtreecommitdiffstats
path: root/src/daemon/CMakeLists.txt
blob: 7c2aad769f16adf089404f6f231bb28bbd3a807f (plain)
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
include_directories(
  ${CMAKE_BINARY_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${TDE_INCLUDE_DIR}
  ${TQT_INCLUDE_DIRS}
  ${DBUS_TQT_INCLUDE_DIRS}
)

link_directories(
  ${TQT_LIBRARY_DIRS}
  ${TDE_LIB_DIR}
)

set( INTROSPECTIONFILE ${CMAKE_CURRENT_SOURCE_DIR}/notificationdaemon.xml )
set( DBUSXML2QT3_EXECUTABLE dbusxml2qt3 )

set( NotificationDaemon_HDRS dbusbaseNode.h  introspectableInterface.h  notificationsInterface.h  notificationsNode.h  notificationsProxy.h )
set( NotificationDaemon_SRCS dbusbaseNode.cpp  introspectableInterface.cpp  notificationsInterface.cpp  notificationsNode.cpp  notificationsProxy.cpp )

function( make_moc fileinput )
    add_custom_command( OUTPUT ${fileinput}.moc
      COMMAND ${TMOC_EXECUTABLE} ${fileinput}.h -o ${fileinput}.moc
      DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${fileinput}.h
      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 
    )
    set_property( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${fileinput}.cpp APPEND
      PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${fileinput}.moc )
endfunction( )
    
##### HardwareControl #########################
add_custom_command( 
    OUTPUT  ${NotificationDaemon_HDRS} ${NotificationDaemon_SRCS}
    COMMAND ${DBUSXML2QT3_EXECUTABLE} ${INTROSPECTIONFILE} 2>/dev/null
    DEPENDS ${INTROSPECTIONFILE}
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 
)

make_moc ( notificationsProxy )

tde_add_executable( notification-daemon-tde AUTOMOC
  SOURCES ${NotificationDaemon_SRCS} notificationNodeService.cpp
        NotificationsService.cpp NotificationDaemon.cpp NotifyWidget.cpp main.cpp
  LINK ${DBUS_TQT_LIBRARIES} tdecore-shared tdeio-shared tdeui-shared
  DESTINATION ${BIN_INSTALL_DIR}
)