2 include_directories(${CMAKE_SOURCE_DIR}/..)
3 include_directories( ${CMAKE_INCLUDE_PATH} )
5 add_definitions(-DDBUS_COMPILATION)
8 SET(BUS_DIR ${CMAKE_SOURCE_DIR}/../bus)
15 # config files for installation
16 FOREACH(file ${config_DATA})
17 CONFIGURE_FILE( "${CMAKE_CURRENT_SOURCE_DIR}/${file}.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${file}" IMMEDIATE @ONLY)
20 # copy services for local daemon start to local service dir data/dbus-1/services
21 SET (SERVICE_FILES test/data/valid-service-files)
22 FILE(GLOB FILES "${CMAKE_SOURCE_DIR}/../${SERVICE_FILES}/*.service.in" )
23 FOREACH(FILE ${FILES})
24 GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME_WE)
25 SET (TARGET ${CMAKE_BINARY_DIR}/data/dbus-1/services/${FILENAME}.service)
27 MESSAGE("FROM: ${FILE}\nTO: ${TARGET}\n")
28 ENDIF (CONFIG_VERBOSE)
29 configure_file(${FILE} ${TARGET} )
33 SET (XML_SOURCES ${BUS_DIR}/config-loader-expat.c)
35 SET (XML_SOURCES ${BUS_DIR}/config-loader-libxml.c)
36 endif (DBUS_USE_EXPAT)
38 # after next cvs update
39 #set (DIR_WATCH_SOURCE ${BUS_DIR}/dir-watch-default.c)
40 set (DIR_WATCH_SOURCE )
43 ${BUS_DIR}/activation.c
44 ${BUS_DIR}/activation.h
47 ${BUS_DIR}/config-parser.c
48 ${BUS_DIR}/config-parser.h
49 ${BUS_DIR}/connection.c
50 ${BUS_DIR}/connection.h
51 ${BUS_DIR}/desktop-file.c
52 ${BUS_DIR}/desktop-file.h
53 ${BUS_DIR}/dir-watch.c
54 ${BUS_DIR}/dir-watch.h
59 ${BUS_DIR}/expirelist.c
60 ${BUS_DIR}/expirelist.h
77 set (dbus_daemon_SOURCES
82 include_directories(${XML_INCLUDE_DIR})
83 SET (LIBS ${XML_LIBRARY})
85 add_executable(dbus-daemon ${dbus_daemon_SOURCES})
86 target_link_libraries(dbus-daemon dbus-1 ${LIBS})
87 install_targets(/bin dbus-daemon )
88 install_files(/etc FILES ${config_DATA})
91 set (dbus_service_SOURCES
92 ${BUS_DIR}/bus-service-win.c
93 # TODO: add additional files
94 # ${BUS_DIR}/service-main.c
98 add_executable(dbus-service ${dbus_service_SOURCES} )
99 target_link_libraries(dbus-service dbus-1 ${LIBS})
100 install_targets(/bin dbus-service )
104 ## note that TESTS has special meaning (stuff to use in make check)
105 ## so if adding tests not to be run in make check, don't add them to
108 #TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus
114 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build
115 ## even when not doing "make check"
116 #noinst_PROGRAMS=$(TESTS)
118 set (bus_test_SOURCES
120 ${BUS_DIR}/test-main.c
123 if (DBUS_BUILD_TESTS)
124 add_executable(bus-test ${bus_test_SOURCES})
125 target_link_libraries(bus-test dbus-1 ${LIBS} )
126 install_targets(/bin bus-test)
127 add_test(bus-test ${EXECUTABLE_OUTPUT_PATH}/bus-test ${CMAKE_SOURCE_DIR}/../test/data)
128 endif (DBUS_BUILD_TESTS)
131 project_source_group(${GROUP_CODE} bus_test_SOURCES dummy)
134 ## mop up the gcov files
136 # /bin/rm *.bb *.bbg *.da *.gcov || true
139 # $(mkinstalldirs) $(DESTDIR)/$(localstatedir)/run/dbus
140 # $(mkinstalldirs) $(DESTDIR)/$(configdir)/system.d
141 # $(mkinstalldirs) $(DESTDIR)/$(datadir)/dbus-1/services
143 ##install_file(${configdir}/system.d FILE
147 #### Init scripts fun
148 #SCRIPT_IN_FILES=messagebus.in
152 #if DBUS_INIT_SCRIPTS_RED_HAT
154 #initddir=$(sysconfdir)/rc.d/init.d
163 #if DBUS_INIT_SCRIPTS_SLACKWARE
165 #initddir=$(sysconfdir)/rc.d/
173 #MAN_IN_FILES=dbus-daemon.1.in
174 #man_MANS = dbus-daemon.1
178 #EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES)