blob: 6464024e057bf00caf6e3be1250c7680903dc382 [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'))
Willy Tu13451e32023-05-24 16:08:18 -070015conf_data.set('HTTPS_PORT', get_option('https_port'))
16enable_health_populate = get_option('health-populate')
17conf_data.set10('BMCWEB_ENABLE_HEALTH_POPULATE', enable_health_populate.enabled())
Ninad Palsule5fd0aaf2023-04-20 15:11:21 -050018enable_proc_mem_status = get_option('redfish-enable-proccessor-memory-status')
19conf_data.set10('BMCWEB_ENABLE_PROC_MEM_STATUS', enable_proc_mem_status.enabled())
Nan Zhou307386e2022-10-12 20:29:34 +000020
Myung Bae662aa6e2023-01-10 14:20:28 -060021# Logging level
22loglvlopt = get_option('bmcweb-logging')
23if get_option('buildtype').startswith('debug') and loglvlopt == 'disabled'
24 # Override logging level as 'debug' if 'bmcweb-logging' is set as 'dsiabled'
25 loglvlopt = 'debug'
26endif
27conf_data.set('BMCWEB_LOGGING_LEVEL', loglvlopt)
28
Nan Zhou307386e2022-10-12 20:29:34 +000029conf_h_dep = declare_dependency(
30 include_directories: include_directories('.'),
31 sources: configure_file(
32 input: 'bmcweb_config.h.in',
33 output: 'bmcweb_config.h',
34 configuration: conf_data
35 )
36)
37
38# Configure and install systemd unit files
39
40configure_file(input : 'bmcweb.socket.in',
41 output : 'bmcweb.socket',
42 install_dir: systemd_system_unit_dir,
43 configuration: conf_data,
44 install : true)
45
46configure_file(input : 'bmcweb.service.in',
47 output : 'bmcweb.service',
48 install_dir: systemd_system_unit_dir,
49 configuration: conf_data,
50 install : true)
51
52# Copy pam-webserver to etc/pam.d
53configure_file(input : 'pam-webserver',
54 output : 'webserver',
55 copy : true,
56 install_dir: '/etc/pam.d',
Myung Bae662aa6e2023-01-10 14:20:28 -060057 install : true)
58