From: Ralf Habacker Date: Thu, 17 Feb 2022 13:04:55 +0000 (+0100) Subject: cmake: fix for ninja phony cycle related configuring errors X-Git-Tag: dbus-1.13.22~7^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=673d48c7c939f5c5f908f8fcb01ccfb8702e9c75;p=thirdparty%2Fdbus.git cmake: fix for ninja phony cycle related configuring errors A prefix has been added to the custom target names in docbook-related macros to fix the reported error: ninja: error: build.ninja:xxx: multiple rules generate doc/dbus-xxx.1.html [-w dupbuild=err] Fixes #377 Signed-off-by: Ralf Habacker --- diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 1e3d9a629..6494aab3c 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -115,7 +115,7 @@ configure_file(${srcfile} ${_outfile}) DEPENDS ${srcfile} ${CMAKE_BINARY_DIR}/CMakeCache.txt COMMENT "Generating ${outname}" ) - add_custom_target(${outname} DEPENDS ${_outfile}) + add_custom_target(xmldoc-${outname} DEPENDS ${_outfile}) endmacro() # @@ -149,8 +149,8 @@ macro(DOCBOOK _source) DEPENDS ${XSLTPROC_EXECUTABLE} ${_infile} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) - add_custom_target(${_outname} DEPENDS ${_outfile}) - add_dependencies(xmldoc ${_outname}) + add_custom_target(xmldoc-${_outname} DEPENDS ${_outfile}) + add_dependencies(xmldoc xmldoc-${_outname}) install(FILES ${_outfile} DESTINATION ${INSTALL_DIR}) endforeach() endmacro()