diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2020-04-23 18:37:54 +0200 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2020-06-10 18:13:47 +0000 |
commit | d5fd3d76f794b9bfdebb57345f79a796885e79f1 (patch) | |
tree | 2d51ee7ee029eefa6c79cbda979dcb83eb7ad8bb /bus | |
parent | f94696eb4f4ebfd1532cf8aa6f911082c3fb9c78 (diff) | |
download | dbus-d5fd3d76f794b9bfdebb57345f79a796885e79f1.tar.gz |
cmake: fix installation of example files
Diffstat (limited to 'bus')
-rw-r--r-- | bus/CMakeLists.txt | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/bus/CMakeLists.txt b/bus/CMakeLists.txt index 84d86125..f56bbb85 100644 --- a/bus/CMakeLists.txt +++ b/bus/CMakeLists.txt @@ -154,19 +154,21 @@ 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 -) +macro(install_example_in_file a) + configure_file(${a}.in ${CMAKE_CURRENT_BINARY_DIR}/${a}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${a} DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus/examples) +endmacro() + +macro(install_example_file a) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${a} DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus/examples) +endmacro() + +install_example_in_file(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 - ) + install_example_in_file(example-system-enable-stats.conf) + install_example_file(example-system-hardening-without-traditional-activation.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 |