blob: 11ef95c6e59ca990a13603406b86e038e6ab96c4 [file] [log] [blame]
Nan Zhou307386e2022-10-12 20:29:34 +00001# Gather the Configuration data
2
3conf_data = configuration_data()
4conf_data.set('BMCWEB_HTTP_REQ_BODY_LIMIT_MB', get_option('http-body-limit'))
5xss_enabled = get_option('insecure-disable-xss')
6conf_data.set10('BMCWEB_INSECURE_DISABLE_XSS_PREVENTION', xss_enabled.enabled())
7enable_redfish_query = get_option('insecure-enable-redfish-query')
8conf_data.set10('BMCWEB_INSECURE_ENABLE_QUERY_PARAMS', enable_redfish_query.enabled())
9# enable_redfish_aggregation = get_option('redfish-aggregation')
10# conf_data.set10('BMCWEB_ENABLE_REDFISH_AGGREGATION', enable_redfish_aggregation.enabled())
11insecure_push_style_notification = get_option('insecure-push-style-notification')
12conf_data.set10('BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING', insecure_push_style_notification.enabled())
13conf_data.set('MESON_INSTALL_PREFIX', get_option('prefix'))
14conf_data.set('HTTPS_PORT', get_option('https_port'))
Ed Tanous6f8273e2023-05-31 12:44:26 -070015enable_health_populate = get_option('redfish-health-populate')
Willy Tu13451e32023-05-24 16:08:18 -070016conf_data.set10('BMCWEB_ENABLE_HEALTH_POPULATE', enable_health_populate.enabled())
Ninad Palsule5fd0aaf2023-04-20 15:11:21 -050017enable_proc_mem_status = get_option('redfish-enable-proccessor-memory-status')
18conf_data.set10('BMCWEB_ENABLE_PROC_MEM_STATUS', enable_proc_mem_status.enabled())
Ed Tanous7f3e84a2022-12-28 16:22:54 -080019enable_multi_host = get_option('experimental-redfish-multi-computer-system')
20conf_data.set10('BMCWEB_ENABLE_MULTI_HOST', enable_multi_host.enabled())
Nan Zhou307386e2022-10-12 20:29:34 +000021
Myung Bae662aa6e2023-01-10 14:20:28 -060022# Logging level
23loglvlopt = get_option('bmcweb-logging')
24if get_option('buildtype').startswith('debug') and loglvlopt == 'disabled'
25 # Override logging level as 'debug' if 'bmcweb-logging' is set as 'dsiabled'
26 loglvlopt = 'debug'
27endif
28conf_data.set('BMCWEB_LOGGING_LEVEL', loglvlopt)
29
Nan Zhou307386e2022-10-12 20:29:34 +000030conf_h_dep = declare_dependency(
31 include_directories: include_directories('.'),
32 sources: configure_file(
33 input: 'bmcweb_config.h.in',
34 output: 'bmcweb_config.h',
35 configuration: conf_data
36 )
37)
38
39# Configure and install systemd unit files
40
41configure_file(input : 'bmcweb.socket.in',
42 output : 'bmcweb.socket',
43 install_dir: systemd_system_unit_dir,
44 configuration: conf_data,
45 install : true)
46
47configure_file(input : 'bmcweb.service.in',
48 output : 'bmcweb.service',
49 install_dir: systemd_system_unit_dir,
50 configuration: conf_data,
51 install : true)
52
53# Copy pam-webserver to etc/pam.d
Ed Tanous0a9c11e2023-05-25 14:32:49 -070054install_data(
55 'pam-webserver',
56 install_dir: '/etc/pam.d/',
57 rename: 'webserver',
58)
Myung Bae662aa6e2023-01-10 14:20:28 -060059