xref: /openbmc/bmcweb/config/meson.build (revision 788fe748)
1# Gather the Configuration data
2
3conf_data = configuration_data()
4conf_data.set('BMCWEB_HTTP_REQ_BODY_LIMIT_MB', get_option('http-body-limit'))
5enable_redfish_query = get_option('insecure-enable-redfish-query')
6conf_data.set10('BMCWEB_INSECURE_ENABLE_QUERY_PARAMS', enable_redfish_query.allowed())
7# enable_redfish_aggregation = get_option('redfish-aggregation')
8# conf_data.set10('BMCWEB_ENABLE_REDFISH_AGGREGATION', enable_redfish_aggregation.allowed())
9insecure_push_style_notification = get_option('insecure-push-style-notification')
10conf_data.set10(
11    'BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING',
12    insecure_push_style_notification.allowed(),
13)
14conf_data.set('MESON_INSTALL_PREFIX', get_option('prefix'))
15conf_data.set('HTTPS_PORT', get_option('https_port'))
16enable_multi_host = get_option('experimental-redfish-multi-computer-system')
17conf_data.set10('BMCWEB_ENABLE_MULTI_HOST', enable_multi_host.allowed())
18enable_http2 = get_option('experimental-http2')
19conf_data.set10('BMCWEB_ENABLE_HTTP2', enable_http2.allowed())
20
21enable_tls = get_option('insecure-disable-ssl')
22conf_data.set10('BMCWEB_ENABLE_TLS', enable_tls.disabled())
23
24conf_data.set10(
25    'BMCWEB_ENABLE_MTLS_COMMON_NAME_PARSING_META',
26    get_option('mutual-tls-common-name-parsing') == 'meta',
27)
28
29# Logging level
30loglvlopt = get_option('bmcweb-logging')
31if get_option('buildtype').startswith('debug') and loglvlopt == 'disabled'
32    # Override logging level as 'debug' if 'bmcweb-logging' is set as 'dsiabled'
33    loglvlopt = 'debug'
34endif
35loglvlopt = loglvlopt.to_upper()
36conf_data.set('BMCWEB_LOGGING_LEVEL', loglvlopt)
37
38conf_h_dep = declare_dependency(
39    include_directories: include_directories('.'),
40    sources: configure_file(
41        input: 'bmcweb_config.h.in',
42        output: 'bmcweb_config.h',
43        configuration: conf_data,
44    ),
45)
46
47# Configure and install systemd unit files
48
49configure_file(
50    input: 'bmcweb.socket.in',
51    output: 'bmcweb.socket',
52    install_dir: systemd_system_unit_dir,
53    configuration: conf_data,
54    install: true,
55)
56
57configure_file(
58    input: 'bmcweb.service.in',
59    output: 'bmcweb.service',
60    install_dir: systemd_system_unit_dir,
61    configuration: conf_data,
62    install: true,
63)
64
65# Copy pam-webserver to etc/pam.d
66install_data(
67    'pam-webserver',
68    install_dir: '/etc/pam.d/',
69    rename: 'webserver',
70)
71