meson: add option to build without docs
authorJames Hilliard <james.hilliard1@gmail.com>
Wed, 4 May 2022 22:53:40 +0000 (16:53 -0600)
committerJames Hilliard <james.hilliard1@gmail.com>
Thu, 5 May 2022 20:15:47 +0000 (14:15 -0600)
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
meson.build
meson_options.txt

index 3cdbf1ae45b1348aeea5367c8bd2d296e09a4598..4335327dbd786caacd1b58473353fece98b8136d 100644 (file)
@@ -81,13 +81,15 @@ pkg_mod.generate(
     description : 'A library for generating easy-to-delta files.'
 )
 
-install_man([
-    'doc/unzck.1',
-    'doc/zck.1',
-    'doc/zck_delta_size.1',
-    'doc/zck_gen_zdict.1',
-    'doc/zck_read_header.1',
-    'doc/zckdl.1',
-])
+if get_option('docs')
+    install_man([
+        'doc/unzck.1',
+        'doc/zck.1',
+        'doc/zck_delta_size.1',
+        'doc/zck_gen_zdict.1',
+        'doc/zck_read_header.1',
+        'doc/zckdl.1',
+    ])
+endif
 
 libzck_dep = declare_dependency(link_with: zcklib, include_directories: 'include')
index fcc19a9e7fc99b2acd4037cb921cb5f7035fcd2d..7cc44d14c36b464956e5c3a0d32ba5dc9d7a5d90 100644 (file)
@@ -2,4 +2,5 @@ option('with-zstd', type : 'feature', value : 'auto')
 option('with-openssl', type : 'feature', value : 'auto')
 option('with-curl', type : 'feature', value : 'auto')
 option('coverity', type : 'boolean', value : false)
+option('docs', type : 'boolean', value : true)
 option('tests', type : 'boolean', value : true)