Commit fb799c6f authored by Ralf Habacker's avatar Ralf Habacker

In cmake use variables provided from GNUInstallDirs consequently

This is required to support a custom installation layout, e.g. the
KDE binary factory.
parent f843e56d
......@@ -509,7 +509,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY
if (WIN32)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dbus-env.bat.cmake ${CMAKE_BINARY_DIR}/bin/dbus-env.bat )
install(FILES ${CMAKE_BINARY_DIR}/bin/dbus-env.bat DESTINATION bin)
install(FILES ${CMAKE_BINARY_DIR}/bin/dbus-env.bat DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
#
......
......@@ -104,17 +104,17 @@ 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 dbus-daemon ${INSTALL_TARGETS_DEFAULT_ARGS})
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)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/session.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/legacy-config/session.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1)
install(DIRECTORY DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/session.d)
install(DIRECTORY DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/services)
if(NOT WIN32)
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)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/system.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/legacy-config/system.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1)
install(DIRECTORY DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/system.d)
install(DIRECTORY DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/system-services)
install(DIRECTORY DESTINATION ${CMAKE_INSTALL_LOCALSTATEDIR}/run/dbus)
endif()
if (DBUS_SERVICE)
......
......@@ -288,7 +288,7 @@ if(WIN32)
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:dbus-1>" "$<TARGET_FILE_DIR:dbus-1>/${CMAKE_SHARED_LIBRARY_PREFIX}dbus-1${CMAKE_SHARED_LIBRARY_SUFFIX}"
COMMENT "Create non versioned dbus-1 library for legacy applications"
)
install(FILES ${LEGACY_FILE_NAME} DESTINATION bin)
install(FILES ${LEGACY_FILE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
if(WINCE)
target_link_libraries(dbus-1 ws2)
......
......@@ -84,9 +84,9 @@ macro(DOCBOOK _sources _format)
endif ()
add_dependencies(xmldoc ${_outname})
if (${_format} STREQUAL "man")
install(FILES ${_outfile} DESTINATION share/man/man1)
install(FILES ${_outfile} DESTINATION ${CMAKE_INSTALL_DATADIR}/man/man1)
else()
install(FILES ${_outfile} DESTINATION share/doc/dbus)
install(FILES ${_outfile} DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus)
endif()
else()
message(STATUS "skipping xml doc generating for ${_infile}, file not found")
......@@ -152,7 +152,7 @@ docbook(${CMAKE_BINARY_DIR}/doc/dbus-update-activation-environment.1.xml html)
# handle html index file
#
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/index.html.cmake ${CMAKE_CURRENT_BINARY_DIR}/index.html )
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/index.html DESTINATION share/doc/dbus)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/index.html DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus)
set (EXTRA_DIST
${DOC_DIR}/busconfig.dtd
......@@ -160,6 +160,6 @@ set (EXTRA_DIST
${DOC_DIR}/introspect.xsl
)
install(FILES ${EXTRA_DIST} DESTINATION share/doc/dbus)
install(FILES ${EXTRA_DIST} DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus)
endif()
......@@ -4,7 +4,7 @@ if (DBUS_INSTALL_SYSTEM_LIBS)
else (MINGW)
INCLUDE(InstallRequiredSystemLibraries)
endif (MINGW)
install(FILES ${LIBEXPAT_LIBRARIES} DESTINATION bin)
install(FILES ${LIBEXPAT_LIBRARIES} DESTINATION ${CMAKE_INSTALL_BINDIR})
endif (DBUS_INSTALL_SYSTEM_LIBS)
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "D-BUS For Windows")
......
......@@ -129,4 +129,4 @@ target_link_libraries(dbus-run-session ${DBUS_INTERNAL_LIBRARIES})
install(TARGETS dbus-run-session ${INSTALL_TARGETS_DEFAULT_ARGS})
# create the /var/lib/dbus directory for dbus-uuidgen
install(DIRECTORY DESTINATION var/lib/dbus)
install(DIRECTORY DESTINATION ${CMAKE_INSTALL_LOCALSTATEDIR}/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