1dffd6523SWilliam A. Kennington III# Copyright 2022 Google LLC 2dffd6523SWilliam A. Kennington III# 3dffd6523SWilliam A. Kennington III# Licensed under the Apache License, Version 2.0 (the "License"); 4dffd6523SWilliam A. Kennington III# you may not use this file except in compliance with the License. 5dffd6523SWilliam A. Kennington III# You may obtain a copy of the License at 6dffd6523SWilliam A. Kennington III# 7dffd6523SWilliam A. Kennington III# http://www.apache.org/licenses/LICENSE-2.0 8dffd6523SWilliam A. Kennington III# 9dffd6523SWilliam A. Kennington III# Unless required by applicable law or agreed to in writing, software 10dffd6523SWilliam A. Kennington III# distributed under the License is distributed on an "AS IS" BASIS, 11dffd6523SWilliam A. Kennington III# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12dffd6523SWilliam A. Kennington III# See the License for the specific language governing permissions and 13dffd6523SWilliam A. Kennington III# limitations under the License. 14dffd6523SWilliam A. Kennington III 15dffd6523SWilliam A. Kennington IIIproject( 16dffd6523SWilliam A. Kennington III 'dhcp-done', 17dffd6523SWilliam A. Kennington III 'cpp', 18dffd6523SWilliam A. Kennington III version: '0.1', 191dfe24eaSPatrick Williams meson_version: '>=1.1.1', 20dffd6523SWilliam A. Kennington III default_options: [ 21dffd6523SWilliam A. Kennington III 'warning_level=3', 22dffd6523SWilliam A. Kennington III 'werror=true', 231dfe24eaSPatrick Williams 'cpp_std=c++23', 24dffd6523SWilliam A. Kennington III ], 25dffd6523SWilliam A. Kennington III) 26dffd6523SWilliam A. Kennington III 27dffd6523SWilliam A. Kennington IIIdeps = [ 28dffd6523SWilliam A. Kennington III dependency('sdeventplus'), 29dffd6523SWilliam A. Kennington III dependency('stdplus'), 30dffd6523SWilliam A. Kennington III] 31dffd6523SWilliam A. Kennington III 32dffd6523SWilliam A. Kennington IIIlibexecdir = get_option('prefix') / get_option('libexecdir') 33*1e76060aSYuxiao Zhangbindir = get_option('prefix') / get_option('bindir') 34*1e76060aSYuxiao Zhang 35*1e76060aSYuxiao Zhangfileio_lib = static_library( 36*1e76060aSYuxiao Zhang 'fileio', 37*1e76060aSYuxiao Zhang [ 38*1e76060aSYuxiao Zhang 'file-io.cpp', 39*1e76060aSYuxiao Zhang ], 40*1e76060aSYuxiao Zhang implicit_include_directories: false) 41dffd6523SWilliam A. Kennington III 42dffd6523SWilliam A. Kennington IIIexecutable( 43dffd6523SWilliam A. Kennington III 'dhcp-done', 44dffd6523SWilliam A. Kennington III 'dhcp-done.cpp', 45dffd6523SWilliam A. Kennington III implicit_include_directories: false, 46dffd6523SWilliam A. Kennington III dependencies: deps, 47*1e76060aSYuxiao Zhang link_with : fileio_lib, 48dffd6523SWilliam A. Kennington III install: true, 49dffd6523SWilliam A. Kennington III install_dir: libexecdir) 50dffd6523SWilliam A. Kennington III 51*1e76060aSYuxiao Zhangexecutable( 52*1e76060aSYuxiao Zhang 'update-dhcp-status', 53*1e76060aSYuxiao Zhang 'update-dhcp-status.cpp', 54*1e76060aSYuxiao Zhang implicit_include_directories: false, 55*1e76060aSYuxiao Zhang dependencies: deps, 56*1e76060aSYuxiao Zhang link_with : fileio_lib, 57*1e76060aSYuxiao Zhang install: true, 58*1e76060aSYuxiao Zhang install_dir: bindir) 59*1e76060aSYuxiao Zhang 60dffd6523SWilliam A. Kennington IIIsystemd = dependency('systemd') 614c4e94f0SPatrick Williamssystemunitdir = systemd.get_variable('systemdsystemunitdir') 62dffd6523SWilliam A. Kennington III 63dffd6523SWilliam A. Kennington IIIconfigure_file( 64dffd6523SWilliam A. Kennington III configuration: {'BIN': libexecdir / 'dhcp-done'}, 65*1e76060aSYuxiao Zhang input: 'dhcp-done.service.in', 66*1e76060aSYuxiao Zhang output: 'dhcp-done.service', 67dffd6523SWilliam A. Kennington III install_mode: 'rw-r--r--', 68dffd6523SWilliam A. Kennington III install_dir: systemunitdir) 69*1e76060aSYuxiao Zhang 70*1e76060aSYuxiao Zhangbuild_tests = get_option('tests') 71*1e76060aSYuxiao Zhang 72*1e76060aSYuxiao Zhang#if not build_tests.disabled() 73*1e76060aSYuxiao Zhangsubdir('test') 74*1e76060aSYuxiao Zhang#endif 75