# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

project(
  'acpi_power_stated',
  'cpp',
  version: '0.1',
  default_options: [
    'warning_level=3',
    'werror=true',
    'cpp_std=c++20',
  ],
)

headers = include_directories('.')

systemd = dependency('systemd')
systemunitdir = systemd.get_variable('systemdsystemunitdir')

deps = [
  systemd,
  dependency('sdbusplus', fallback: ['sdbusplus', 'sdbusplus_dep']),
  dependency(
    'phosphor-dbus-interfaces',
    fallback: ['phosphor-dbus-interfaces', 'phosphor_dbus_interfaces_dep']),
]

bindir = get_option('prefix') / get_option('bindir')

executable(
  'acpi_power_stated',
  'acpi_power_state.cpp',
  include_directories: headers,
  implicit_include_directories: false,
  dependencies: deps,
  install: true,
  install_dir: bindir)

configure_file(
  configuration: {'BIN': bindir / 'acpi_power_stated'},
  input: 'acpi-power-state.service.in',
  output: 'acpi-power-state.service',
  install_mode: 'rw-r--r--',
  install_dir: systemunitdir)

install_data(
  'host-s0-state.target',
  'host-s5-state.target',
  install_mode: 'rw-r--r--',
  install_dir: systemunitdir)
