]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/systemd/meson.build
Merge pull request #17549 from yuwata/tiny-fixes
[thirdparty/systemd.git] / src / systemd / meson.build
index dde0aaf7819c932bcff9eeb49327a3bb2b42eaa4..f585b2d75b1f17b5090ea9207d7b8c4a33e41faf 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 _systemd_headers = '''
         sd-bus.h
@@ -12,6 +12,7 @@ _systemd_headers = '''
         sd-journal.h
         sd-login.h
         sd-messages.h
+        sd-path.h
 '''.split()
 
 # https://github.com/mesonbuild/meson/issues/1633
@@ -22,6 +23,8 @@ _not_installed_headers = '''
         sd-dhcp6-lease.h
         sd-dhcp-client.h
         sd-dhcp-lease.h
+        sd-dhcp-option.h
+        sd-dhcp6-option.h
         sd-dhcp-server.h
         sd-ipv4acd.h
         sd-ipv4ll.h
@@ -29,7 +32,6 @@ _not_installed_headers = '''
         sd-ndisc.h
         sd-netlink.h
         sd-network.h
-        sd-path.h
         sd-radv.h
         sd-resolve.h
         sd-utf8.h
@@ -52,8 +54,7 @@ if cc.has_argument('-std=iso9899:2017')
         opts += [['c', '-std=iso9899:2017']]
 endif
 
-cxx = find_program('c++', required : false)
-if cxx.found()
+if add_languages('cpp', required : false)
         opts += [['c++'],
                  ['c++', '-std=c++98'],
                  ['c++', '-std=c++11']]
@@ -65,11 +66,11 @@ if cxx.found()
         endif
 endif
 
-foreach header : _systemd_headers + _not_installed_headers
+foreach header : _systemd_headers + _not_installed_headers + ['../libudev/libudev.h']
         foreach opt : opts
-                name = ''.join([header, ':'] + opt)
+                name = ''.join(['cc-', header.split('/')[-1], ':'] + opt)
                 if want_tests != 'false'
-                        test('cc-' + name,
+                        test(name,
                              check_compilation_sh,
                              args : cc.cmd_array() + ['-c', '-x'] + opt +
                                     ['-Werror', '-include',