Merge branch 'cmake-install-fixes' into 'master'

CMake install fixes

See merge request dbus/dbus!98
This commit is contained in:
Ralf Habacker 2019-03-13 09:48:04 +00:00
commit 30b9cc540c
6 changed files with 54 additions and 3 deletions

View file

@ -89,6 +89,7 @@ set(DATADIR_FROM_PKGSYSCONFDIR ${CMAKE_INSTALL_FULL_DATADIR})
endif()
option(DBUS_RELOCATABLE "Attempt to make metadata relocatable" ON)
option(DBUS_ENABLE_PKGCONFIG "Enable pkgconfig support" ON)
# For simplicity, we're not relocatable if CMAKE_INSTALL_LIBDIR
# is something more complicated (e.g. Debian multiarch);
@ -671,7 +672,7 @@ add_custom_target(help-options
#
# create pkgconfig file
#
if(UNIX)
if(DBUS_ENABLE_PKGCONFIG)
set(PLATFORM_LIBS pthread ${LIBRT})
include(FindPkgConfig QUIET)
if(PKG_CONFIG_FOUND)

View file

@ -127,7 +127,7 @@ RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = YES
GENERATE_MAN = @DBUS_GENERATE_MAN@
MAN_OUTPUT = man
MAN_EXTENSION = .3dbus
MAN_LINKS = YES

View file

@ -150,6 +150,19 @@ if(MSVC)
project_source_group(${GROUP_CODE} bus_test_SOURCES dummy)
endif()
configure_file(example-session-disable-stats.conf.in ${CMAKE_CURRENT_BINARY_DIR}/example-session-disable-stats.conf)
set(EXAMPLES_DATA
${CMAKE_CURRENT_BINARY_DIR}/example-session-disable-stats.conf
)
if(NOT WIN32)
configure_file(example-system-enable-stats.conf.in ${CMAKE_CURRENT_BINARY_DIR}/example-system-enable-stats.conf)
list(APPEND EXAMPLES_DATA
${CMAKE_CURRENT_BINARY_DIR}/example-system-enable-stats.conf
)
endif()
install(FILES ${EXAMPLES_DATA} DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus/examples)
## mop up the gcov files
#clean-local:
# /bin/rm *.bb *.bbg *.da *.gcov || true

View file

@ -1269,6 +1269,13 @@ if test x$enable_doxygen_docs = xyes; then
fi
fi
if test x$dbus_win = xno; then
DBUS_GENERATE_MAN=YES
else
DBUS_GENERATE_MAN=NO
fi
AC_SUBST([DBUS_GENERATE_MAN])
AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes)
AC_MSG_RESULT($enable_doxygen_docs)

View file

@ -12,6 +12,11 @@ endif()
if(DBUS_ENABLE_DOXYGEN_DOCS)
set(top_srcdir ${CMAKE_SOURCE_DIR})
if(WIN32)
set(DBUS_GENERATE_MAN NO)
else()
set(DBUS_GENERATE_MAN YES)
endif()
configure_file(../Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile )
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/api/html/index.html
@ -123,6 +128,7 @@ configure_file(dbus-cleanup-sockets.1.xml.in ${CMAKE_CURRENT_BINARY_DIR}/dbus-cl
configure_file(dbus-daemon.1.xml.in ${CMAKE_CURRENT_BINARY_DIR}/dbus-daemon.1.xml)
configure_file(dbus-launch.1.xml.in ${CMAKE_CURRENT_BINARY_DIR}/dbus-launch.1.xml)
configure_file(dbus-monitor.1.xml.in ${CMAKE_CURRENT_BINARY_DIR}/dbus-monitor.1.xml)
configure_file(dbus-run-session.1.xml.in ${CMAKE_CURRENT_BINARY_DIR}/dbus-run-session.1.xml)
configure_file(dbus-send.1.xml.in ${CMAKE_CURRENT_BINARY_DIR}/dbus-send.1.xml)
configure_file(dbus-test-tool.1.xml.in ${CMAKE_CURRENT_BINARY_DIR}/dbus-test-tool.1.xml)
configure_file(dbus-update-activation-environment.1.xml.in ${CMAKE_CURRENT_BINARY_DIR}/dbus-update-activation-environment.1.xml)
@ -130,6 +136,7 @@ configure_file(dbus-uuidgen.1.xml.in ${CMAKE_CURRENT_BINARY_DIR}/dbus-uuidgen.1.
if(UNIX)
docbook(${CMAKE_CURRENT_BINARY_DIR}/dbus-daemon.1.xml man)
docbook(${CMAKE_CURRENT_BINARY_DIR}/dbus-monitor.1.xml man)
docbook(${CMAKE_CURRENT_BINARY_DIR}/dbus-run-session.1.xml man)
docbook(${CMAKE_CURRENT_BINARY_DIR}/dbus-send.1.xml man)
docbook(${CMAKE_CURRENT_BINARY_DIR}/dbus-test-tool.1.xml man)
docbook(${CMAKE_CURRENT_BINARY_DIR}/dbus-launch.1.xml man)
@ -139,6 +146,7 @@ if(UNIX)
endif()
docbook(${CMAKE_CURRENT_BINARY_DIR}/dbus-daemon.1.xml html)
docbook(${CMAKE_CURRENT_BINARY_DIR}/dbus-monitor.1.xml html)
docbook(${CMAKE_CURRENT_BINARY_DIR}/dbus-run-session.1.xml html)
docbook(${CMAKE_CURRENT_BINARY_DIR}/dbus-send.1.xml html)
docbook(${CMAKE_CURRENT_BINARY_DIR}/dbus-test-tool.1.xml html)
docbook(${CMAKE_CURRENT_BINARY_DIR}/dbus-launch.1.xml html)
@ -152,12 +160,28 @@ docbook(${CMAKE_CURRENT_BINARY_DIR}/dbus-update-activation-environment.1.xml htm
configure_file(index.html.in ${CMAKE_CURRENT_BINARY_DIR}/index.html)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/index.html DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus)
#
# misc files
#
set(DTD_DATA
diagram.png
diagram.svg
)
install(FILES ${DTD_DATA} DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus)
set(DOC_DATA
system-activation.txt
)
install(FILES ${DOC_DATA} DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus)
set(EXTRA_DIST
busconfig.dtd
introspect.dtd
introspect.xsl
)
install(FILES ${EXTRA_DIST} DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus)
install(FILES ${EXTRA_DIST} DESTINATION ${CMAKE_INSTALL_DATADIR}/xml/dbus-1)
endif()

View file

@ -109,3 +109,9 @@ install(TARGETS dbus-run-session ${INSTALL_TARGETS_DEFAULT_ARGS})
# create the /var/lib/dbus directory for dbus-uuidgen
install(DIRECTORY DESTINATION ${CMAKE_INSTALL_LOCALSTATEDIR}/lib/dbus)
set(EXAMPLES_SCRIPTS
GetAllMatchRules.py
)
install(FILES ${EXAMPLES_SCRIPTS} DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus/examples)