meson.build: move doxygen check to doc/meson.build
authorMax Kellermann <max@musicpd.org>
Sun, 25 Feb 2018 20:33:09 +0000 (21:33 +0100)
committerMax Kellermann <max@musicpd.org>
Sun, 25 Feb 2018 20:33:09 +0000 (21:33 +0100)
doc/meson.build
meson.build

index a65a8c2..0884231 100644 (file)
@@ -1,16 +1,22 @@
-dconf = configuration_data()
-dconf.set('VERSION', meson.project_version())
-dconf.set('abs_top_srcdir', meson.source_root())
+if get_option('documentation')
+  doxygen = find_program('doxygen', required: false)
 
-doxyfile = configure_file(input: 'doxygen.conf.in',
-                          output: 'doxygen.conf',
-                          configuration: dconf)
+  if doxygen.found()
+    dconf = configuration_data()
+    dconf.set('VERSION', meson.project_version())
+    dconf.set('abs_top_srcdir', meson.source_root())
 
-datadir = join_paths(get_option('datadir'), 'doc', 'spede')
+    doxyfile = configure_file(input: 'doxygen.conf.in',
+                              output: 'doxygen.conf',
+                              configuration: dconf)
 
-html_target = custom_target('apidocs',
-                            input: doxyfile,
-                            output: 'html',
-                            command: [doxygen, doxyfile],
-                            install: true,
-                            install_dir: docdir)
+    datadir = join_paths(get_option('datadir'), 'doc', 'spede')
+
+    html_target = custom_target('apidocs',
+                                input: doxyfile,
+                                output: 'html',
+                                command: [doxygen, doxyfile],
+                                install: true,
+                                install_dir: docdir)
+  endif
+endif
index b674fda..6810211 100644 (file)
@@ -385,9 +385,4 @@ if not mini
   subdir('test')
 endif
 
-if get_option('documentation')
-  doxygen = find_program('doxygen', required: false)
-  if doxygen.found()
-    subdir('doc')
-  endif
-endif
+subdir('doc')