"Fossies" - the Fresh Open Source Software Archive

Member "dbus-1.13.18/bus/CMakeLists.txt" (1 Jul 2020, 7210 Bytes) of package /linux/misc/dbus-1.13.18.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "CMakeLists.txt": 1.13.16_vs_1.13.18.

    1 add_definitions(-DDBUS_COMPILATION)
    2 
    3 set(EFENCE "")
    4 
    5 # config files for installation 
    6 configure_file( "session.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/session.conf" IMMEDIATE @ONLY)
    7 configure_file( "legacy-config/session.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/legacy-config/session.conf" IMMEDIATE @ONLY)
    8 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/session.d)
    9 
   10 if(NOT WIN32)
   11     configure_file( "system.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/system.conf" IMMEDIATE @ONLY)
   12     configure_file( "legacy-config/system.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/legacy-config/system.conf" IMMEDIATE @ONLY)
   13     file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/system.d)
   14 endif()
   15 
   16 # copy services for local daemon start to local service dir data/dbus-1/services
   17 set(SERVICE_FILES test/data/valid-service-files)
   18 file(GLOB FILES "${SERVICE_FILES}/*.service.in" )
   19 foreach(FILE ${FILES})
   20     get_filename_component(FILENAME ${FILE} NAME_WE)
   21     set(TARGET ${CMAKE_BINARY_DIR}/data/dbus-1/services/${FILENAME}.service)
   22     if(CONFIG_VERBOSE)
   23         message("FROM: ${FILE}\nTO: ${TARGET}\n")
   24     endif()
   25     configure_file(${FILE} ${TARGET} )
   26 endforeach()
   27 
   28 
   29 if(DBUS_BUS_ENABLE_INOTIFY)
   30     set(DIR_WATCH_SOURCE dir-watch-inotify.c)
   31 elseif(DBUS_BUS_ENABLE_KQUEUE)
   32     set(DIR_WATCH_SOURCE dir-watch-kqueue.c)
   33 else(DBUS_BUS_ENABLE_INOTIFY)
   34     set(DIR_WATCH_SOURCE dir-watch-default.c)
   35 endif()
   36 
   37 set(BUS_SOURCES
   38     activation.c
   39     activation.h
   40     apparmor.c
   41     apparmor.h
   42     audit.c
   43     audit.h
   44     bus.c
   45     bus.h
   46     config-loader-expat.c
   47     config-parser.c
   48     config-parser.h
   49     config-parser-common.c
   50     config-parser-common.h
   51 #    config-parser-trivial.c
   52     connection.c
   53     connection.h
   54     containers.c
   55     containers.h
   56     desktop-file.c
   57     desktop-file.h
   58     dir-watch.h
   59     dispatch.c
   60     dispatch.h
   61     driver.c
   62     driver.h
   63     expirelist.c
   64     expirelist.h
   65     policy.c
   66     policy.h
   67     selinux.h
   68     selinux.c
   69     services.c
   70     services.h
   71     signals.c
   72     signals.h
   73     test.c
   74     test.h
   75     utils.c
   76     utils.h
   77     ${DIR_WATCH_SOURCE}
   78 )
   79 if(DBUS_ENABLE_STATS)
   80     list(APPEND BUS_SOURCES
   81         stats.c
   82         stats.h
   83     )
   84 endif()
   85 
   86 include_directories(
   87     ${CMAKE_BINARY_DIR}
   88     ${CMAKE_SOURCE_DIR}/..
   89     ${EXPAT_INCLUDE_DIR}
   90 )
   91 
   92 set(DBUS_DAEMON_SOURCES
   93     main.c
   94 )
   95 
   96 if(WIN32)
   97     add_executable_version_info(DBUS_DAEMON_SOURCES "dbus-daemon")
   98 endif()
   99 
  100 add_library(dbus-daemon-internal STATIC ${BUS_SOURCES})
  101 target_link_libraries(dbus-daemon-internal ${DBUS_INTERNAL_LIBRARIES} ${EXPAT_LIBRARIES})
  102 
  103 add_executable(dbus-daemon ${DBUS_DAEMON_SOURCES})
  104 target_link_libraries(dbus-daemon dbus-daemon-internal)
  105 set_target_properties(dbus-daemon PROPERTIES OUTPUT_NAME ${DBUS_DAEMON_NAME})
  106 set_target_properties(dbus-daemon PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS})
  107 
  108 install(TARGETS dbus-daemon ${INSTALL_TARGETS_DEFAULT_ARGS})
  109 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/session.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1)
  110 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/legacy-config/session.conf DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/dbus-1)
  111 install(DIRECTORY DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/session.d)
  112 install(DIRECTORY DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/services)
  113 
  114 if(NOT WIN32)
  115     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/system.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1)
  116     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/legacy-config/system.conf DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/dbus-1)
  117     install(DIRECTORY DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/system.d)
  118     install(DIRECTORY DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/system-services)
  119     install(DIRECTORY DESTINATION ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run/dbus)
  120 endif()
  121 
  122 if(DBUS_SERVICE)
  123     set(dbus_service_SOURCES
  124         bus-service-win.c
  125         # TODO: add additional files
  126         #    service-main.c
  127         #    ${BUS_SOURCES}
  128     )
  129 
  130     add_executable_version_info(dbus_service_SOURCES "dbus-service")
  131     add_executable(dbus-service ${dbus_service_SOURCES} )
  132     target_link_libraries(dbus-service ${DBUS_INTERNAL_LIBRARIES} ${EXPAT_LIBRARIES})
  133     set_target_properties(dbus-service PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS})
  134     install(TARGETS dbus-service ${INSTALL_TARGETS_DEFAULT_ARGS})
  135 endif()
  136 
  137 set(LAUNCH_HELPER_SOURCES
  138     config-loader-expat.c
  139     config-parser-common.c
  140     config-parser-trivial.c
  141     desktop-file.c
  142     utils.c
  143 )
  144 
  145 if(NOT WIN32)
  146     add_library(launch-helper-internal STATIC ${LAUNCH_HELPER_SOURCES})
  147     target_link_libraries(launch-helper-internal ${DBUS_INTERNAL_LIBRARIES} ${EXPAT_LIBRARIES})
  148 
  149     add_executable(dbus-daemon-launch-helper activation-helper.c activation-helper-bin.c )
  150     target_link_libraries(dbus-daemon-launch-helper launch-helper-internal)
  151 endif()
  152 
  153 if(MSVC)
  154     project_source_group(${GROUP_CODE} bus_test_SOURCES dummy)
  155 endif()
  156 
  157 macro(install_example_in_file a)
  158     configure_file(${a}.in ${CMAKE_CURRENT_BINARY_DIR}/${a})
  159     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${a} DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus/examples)
  160 endmacro()
  161 
  162 macro(install_example_file a)
  163     install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${a} DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus/examples)
  164 endmacro()
  165 
  166 install_example_in_file(example-session-disable-stats.conf)
  167 if(NOT WIN32)
  168     install_example_in_file(example-system-enable-stats.conf)
  169     install_example_file(example-system-hardening-without-traditional-activation.conf)
  170 endif()
  171 
  172 if(DBUS_BUS_ENABLE_SYSTEMD)
  173     configure_file(dbus.socket.in ${CMAKE_CURRENT_BINARY_DIR}/dbus.socket)
  174     configure_file(dbus.service.in ${CMAKE_CURRENT_BINARY_DIR}/dbus.service)
  175     add_systemd_service(${CMAKE_CURRENT_BINARY_DIR}/dbus.socket PATH ${DBUS_SYSTEMD_SYSTEMUNITDIR} LINKS sockets.target.wants)
  176     add_systemd_service(${CMAKE_CURRENT_BINARY_DIR}/dbus.service PATH ${DBUS_SYSTEMD_SYSTEMUNITDIR} LINKS multi-user.target.wants)
  177 endif()
  178 
  179 if(DBUS_ENABLE_USER_SESSION)
  180     configure_file(systemd-user/dbus.socket.in ${CMAKE_CURRENT_BINARY_DIR}/systemd-user/dbus.socket)
  181     configure_file(systemd-user/dbus.service.in ${CMAKE_CURRENT_BINARY_DIR}/systemd-user/dbus.service)
  182     add_systemd_service(${CMAKE_CURRENT_BINARY_DIR}/systemd-user/dbus.socket PATH ${DBUS_SYSTEMD_USERUNITDIR} LINKS sockets.target.wants)
  183     add_systemd_service(${CMAKE_CURRENT_BINARY_DIR}/systemd-user/dbus.service PATH ${DBUS_SYSTEMD_USERUNITDIR})
  184 endif()
  185 
  186 ## mop up the gcov files
  187 #clean-local:
  188 #	/bin/rm *.bb *.bbg *.da *.gcov || true
  189 
  190 #install-data-hook:
  191 #	$(mkinstalldirs) $(DESTDIR)/$(localstatedir)/run/dbus
  192 #	$(mkinstalldirs) $(DESTDIR)/$(configdir)/system.d
  193 #	$(mkinstalldirs) $(DESTDIR)/$(datadir)/dbus-1/services
  194 
  195 ##install_file(${configdir}/system.d FILE
  196 
  197 #### Init scripts fun
  198 #SCRIPT_IN_FILES=messagebus.in
  199 #		rc.messagebus.in
  200 
  201 ## Red Hat start
  202 #if DBUS_INIT_SCRIPTS_RED_HAT
  203 
  204 #initddir=$(sysconfdir)/rc.d/init.d
  205 
  206 #initd_SCRIPTS= 	
  207 #	messagebus
  208 
  209 #endif
  210 # ## Red Hat end
  211 
  212 ## Slackware start
  213 #if DBUS_INIT_SCRIPTS_SLACKWARE
  214 
  215 #initddir=$(sysconfdir)/rc.d/
  216 
  217 #initd_SCRIPTS= 	
  218 #	rc.messagebus
  219 
  220 #endif
  221 ## Slackware end
  222 
  223 #MAN_IN_FILES=dbus-daemon.1.in
  224 #man_MANS = dbus-daemon.1
  225 
  226 #### Extra dist 
  227 
  228 #EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES)