From bd894ef7e544c58f75da24b13a62eb441323ba12 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Mon, 2 Mar 2015 11:55:54 +0000 Subject: [PATCH 2/2] Adjust cmake build to match autoconf installation locations. Organization: Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ --- cmake/CMakeLists.txt | 9 ++++--- cmake/bus/CMakeLists.txt | 15 +++++++---- cmake/bus/system.conf.cmake | 62 --------------------------------------------- 3 files changed, 16 insertions(+), 70 deletions(-) delete mode 100644 cmake/bus/system.conf.cmake diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index adc6d4b..b9dee2c 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -75,7 +75,10 @@ set(EXPANDED_DATADIR ${DBUS_INSTALL_DIR}/${DBUS_DATADIR}) set(DBUS_MACHINE_UUID_FILE ${DBUS_INSTALL_DIR}/lib/dbus/machine-id) set(DBUS_BINDIR ${EXPANDED_BINDIR}) set(DBUS_DAEMONDIR ${EXPANDED_BINDIR}) -set(DBUS_LOCALSTATEDIR ${DBUS_INSTALL_DIR}/var) +set(DBUS_LOCALSTATEDIR /var) +set(DBUS_SYSCONFDIR /etc) +set(DBUS_LIBEXECDIR ${EXPANDED_LIBDIR}) +set(DBUS_DATADIR ${EXPANDED_DATADIR}) #enable building of shared library SET(BUILD_SHARED_LIBS ON) @@ -425,8 +428,8 @@ if (WIN32) set (DBUS_SESSION_BUS_LISTEN_ADDRESS "autolaunch:" CACHE STRING "session bus default listening address") set (DBUS_SESSION_BUS_CONNECT_ADDRESS "autolaunch:" CACHE STRING "session bus fallback address for clients") - set (DBUS_SYSTEM_CONFIG_FILE "etc/dbus-1/system.conf") - set (DBUS_SESSION_CONFIG_FILE "etc/dbus-1/session.conf") + set (DBUS_SYSTEM_CONFIG_FILE "share/dbus-1/system.conf") + set (DBUS_SESSION_CONFIG_FILE "share/dbus-1/session.conf") # bus-test expects a non empty string set (DBUS_USER "Administrator") set (DBUS_TEST_USER "guest") diff --git a/cmake/bus/CMakeLists.txt b/cmake/bus/CMakeLists.txt index 40f6690..935881a 100644 --- a/cmake/bus/CMakeLists.txt +++ b/cmake/bus/CMakeLists.txt @@ -5,10 +5,12 @@ SET(BUS_DIR ${CMAKE_SOURCE_DIR}/../bus) # config files for installation CONFIGURE_FILE( "${BUS_DIR}/session.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/session.conf" IMMEDIATE @ONLY) +CONFIGURE_FILE( "${BUS_DIR}/legacy-config/session.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/legacy-config/session.conf" IMMEDIATE @ONLY) FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/session.d) if(NOT WIN32) - CONFIGURE_FILE( "system.conf.cmake" "${CMAKE_CURRENT_BINARY_DIR}/system.conf" IMMEDIATE @ONLY) + CONFIGURE_FILE( "${BUS_DIR}/system.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/system.conf" IMMEDIATE @ONLY) + CONFIGURE_FILE( "${BUS_DIR}/legacy-config/system.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/legacy-config/system.conf" IMMEDIATE @ONLY) FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/system.d) endif() @@ -91,13 +93,15 @@ set_target_properties(dbus-daemon PROPERTIES OUTPUT_NAME ${DBUS_DAEMON_NAME}) set_target_properties(dbus-daemon PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) install_targets(/bin dbus-daemon) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/session.conf DESTINATION etc/dbus-1) -install(DIRECTORY DESTINATION etc/dbus-1/session.d) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/session.conf DESTINATION share/dbus-1) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/legacy-config/session.conf DESTINATION etc/dbus-1) +install(DIRECTORY DESTINATION share/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(FILES ${CMAKE_CURRENT_BINARY_DIR}/system.conf DESTINATION share/dbus-1) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/legacy-config/system.conf DESTINATION etc/dbus-1) + install(DIRECTORY DESTINATION share/dbus-1/system.d) install(DIRECTORY DESTINATION share/dbus-1/system-services) install(DIRECTORY DESTINATION var/run/dbus) endif() @@ -169,6 +173,7 @@ if(NOT WIN32) set (SOURCES ${LAUNCH_HELPER_SOURCES} ${BUS_DIR}/test-launch-helper.c) add_test_executable(test-bus-launch-helper "${SOURCES}" ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) set_target_properties(test-bus-launch-helper PROPERTIES COMPILE_FLAGS "-DACTIVATION_LAUNCHER_TEST -DACTIVATION_LAUNCHER_DO_OOM") + install_targets(/lib dbus-daemon-launch-helper) endif(NOT WIN32) #### Init scripts fun diff --git a/cmake/bus/system.conf.cmake b/cmake/bus/system.conf.cmake deleted file mode 100644 index ee85ecc..0000000 --- a/cmake/bus/system.conf.cmake +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - system - - - @DBUS_USER@ - - - - - - @DBUS_SYSTEM_PID_FILE@ - - - EXTERNAL - - - @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ - - - - - - - - - - - - - - - - - - - system.d - - - system-local.conf - - contexts/dbus_contexts - - -- 2.1.0