Commit 6864780b authored by Ralf Habacker's avatar Ralf Habacker

Fix installation of empty directories for cmake build system.

The differences has been found out by comparing with the cross compiled
mingw..-dbus packages.

[exclude system bus support bits on Windows -smcv]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83583Reviewed-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
parent 87448fed
...@@ -73,7 +73,7 @@ set(EXPANDED_DATADIR ${DBUS_INSTALL_DIR}/${DBUS_DATADIR}) ...@@ -73,7 +73,7 @@ set(EXPANDED_DATADIR ${DBUS_INSTALL_DIR}/${DBUS_DATADIR})
set(DBUS_MACHINE_UUID_FILE ${DBUS_INSTALL_DIR}/lib/dbus/machine-id) set(DBUS_MACHINE_UUID_FILE ${DBUS_INSTALL_DIR}/lib/dbus/machine-id)
set(DBUS_BINDIR ${EXPANDED_BINDIR}) set(DBUS_BINDIR ${EXPANDED_BINDIR})
set(DBUS_DAEMONDIR ${EXPANDED_BINDIR}) set(DBUS_DAEMONDIR ${EXPANDED_BINDIR})
set(DBUS_LOCALSTATEDIR ${DBUS_INSTALL_DIR}/var)
#enable building of shared library #enable building of shared library
SET(BUILD_SHARED_LIBS ON) SET(BUILD_SHARED_LIBS ON)
...@@ -401,7 +401,7 @@ endif (MSVC_IDE) ...@@ -401,7 +401,7 @@ endif (MSVC_IDE)
endif (NOT $ENV{TMPDIR} STREQUAL "") endif (NOT $ENV{TMPDIR} STREQUAL "")
# Not used on Windows, where there is no system bus # Not used on Windows, where there is no system bus
set (DBUS_SYSTEM_PID_FILE ${EXPANDED_LOCALSTATEDIR}/run/dbus/pid) set (DBUS_SYSTEM_PID_FILE ${DBUS_LOCALSTATEDIR}/run/dbus/pid)
if (WIN32) if (WIN32)
set (DBUS_CONSOLE_AUTH_DIR "") set (DBUS_CONSOLE_AUTH_DIR "")
...@@ -423,7 +423,7 @@ set (DEFAULT_MESSAGE_UNIX_FDS 1024) ...@@ -423,7 +423,7 @@ set (DEFAULT_MESSAGE_UNIX_FDS 1024)
# and also to connect to. If this ever changes, it'll need to be split into # and also to connect to. If this ever changes, it'll need to be split into
# two variables, one for the listening address and one for the connecting # two variables, one for the listening address and one for the connecting
# address. # address.
set (DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:path=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket" CACHE STRING "system bus default address") set (DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:path=${DBUS_LOCALSTATEDIR}/run/dbus/system_bus_socket" CACHE STRING "system bus default address")
if (WIN32) if (WIN32)
set (DBUS_SESSION_BUS_LISTEN_ADDRESS "autolaunch:" CACHE STRING "session bus default listening address") set (DBUS_SESSION_BUS_LISTEN_ADDRESS "autolaunch:" CACHE STRING "session bus default listening address")
......
...@@ -3,17 +3,14 @@ add_definitions(-DDBUS_COMPILATION) ...@@ -3,17 +3,14 @@ add_definitions(-DDBUS_COMPILATION)
SET(EFENCE "") SET(EFENCE "")
SET(BUS_DIR ${CMAKE_SOURCE_DIR}/../bus) SET(BUS_DIR ${CMAKE_SOURCE_DIR}/../bus)
set (config_DATA
session.conf
system.conf
)
# config files for installation # config files for installation
CONFIGURE_FILE( "${BUS_DIR}/session.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/session.conf" IMMEDIATE @ONLY) CONFIGURE_FILE( "${BUS_DIR}/session.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/session.conf" IMMEDIATE @ONLY)
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/session.d) FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/session.d)
CONFIGURE_FILE( "system.conf.cmake" "${CMAKE_CURRENT_BINARY_DIR}/system.conf" IMMEDIATE @ONLY) if(NOT WIN32)
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/system.d) CONFIGURE_FILE( "system.conf.cmake" "${CMAKE_CURRENT_BINARY_DIR}/system.conf" IMMEDIATE @ONLY)
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/system.d)
endif()
# copy services for local daemon start to local service dir data/dbus-1/services # copy services for local daemon start to local service dir data/dbus-1/services
SET (SERVICE_FILES test/data/valid-service-files) SET (SERVICE_FILES test/data/valid-service-files)
...@@ -88,8 +85,16 @@ set_target_properties(dbus-daemon PROPERTIES OUTPUT_NAME ${DBUS_DAEMON_NAME}) ...@@ -88,8 +85,16 @@ set_target_properties(dbus-daemon PROPERTIES OUTPUT_NAME ${DBUS_DAEMON_NAME})
set_target_properties(dbus-daemon PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) set_target_properties(dbus-daemon PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS})
install_targets(/bin dbus-daemon) install_targets(/bin dbus-daemon)
install_files(/etc/dbus-1 FILES ${config_DATA}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/session.conf DESTINATION etc/dbus-1)
install(DIRECTORY . DESTINATION etc/dbus-1/session.d FILES_MATCHING PATTERN "*.conf") install(DIRECTORY DESTINATION etc/dbus-1/session.d)
install(DIRECTORY DESTINATION share/dbus-1/services)
if(NOT WIN32)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/system.conf DESTINATION etc/dbus-1)
install(DIRECTORY DESTINATION etc/dbus-1/system.d)
install(DIRECTORY DESTINATION share/dbus-1/system-services)
install(DIRECTORY DESTINATION var/run/dbus)
endif()
if (DBUS_SERVICE) if (DBUS_SERVICE)
set (dbus_service_SOURCES set (dbus_service_SOURCES
......
...@@ -45,3 +45,6 @@ install_targets(/bin dbus-launch ) ...@@ -45,3 +45,6 @@ install_targets(/bin dbus-launch )
add_executable(dbus-monitor ${dbus_monitor_SOURCES}) add_executable(dbus-monitor ${dbus_monitor_SOURCES})
target_link_libraries(dbus-monitor ${DBUS_LIBRARIES}) target_link_libraries(dbus-monitor ${DBUS_LIBRARIES})
install_targets(/bin dbus-monitor ) install_targets(/bin dbus-monitor )
# create the /var/lib/dbus directory for dbus-uuidgen
install(DIRECTORY DESTINATION var/lib/dbus)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment