]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Add target devhelp2 only when xsltproc has been found
authorRalf Habacker <ralf.habacker@freenet.de>
Fri, 25 Jan 2019 17:42:16 +0000 (18:42 +0100)
committerRalf Habacker <ralf.habacker@freenet.de>
Wed, 13 Mar 2019 09:49:54 +0000 (10:49 +0100)
It doesn't make sense to add a make target if it can't be created.

doc/CMakeLists.txt

index 6c29ba455aedd73cfdca3ede8ebed16389f306c9..399e531378b9a16b07a1795f679a66575e46b2cf 100644 (file)
@@ -29,10 +29,6 @@ if(DBUS_ENABLE_DOXYGEN_DOCS)
         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
     )
     add_dependencies(doc apidoc)
-    add_custom_target(devhelp2
-        DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/api/html/index.html ${CMAKE_CURRENT_BINARY_DIR}/dbus.devhelp2
-    )
-    add_dependencies(doc devhelp2)
     install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/api/html/ DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus/api)
 endif()
 
@@ -49,6 +45,10 @@ if(DBUS_HAVE_XSLTPROC)
         DEPENDS doxygen_to_devhelp.xsl api/html/index.html
         WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
+    add_custom_target(devhelp2
+        DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/api/html/index.html ${CMAKE_CURRENT_BINARY_DIR}/dbus.devhelp2
+    )
+    add_dependencies(doc devhelp2)
     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dbus.devhelp2 DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/dbus)
 endif()