meson: simplify config data

Simplify the meson.build configuration data by removing a number of
entries, which never need to be configured, and move as static fields
in a config.hpp template.

Change-Id: Idd9383c9c38eceb066a5d1e25a086db175aa06bf
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/meson.build b/meson.build
index 8c0405c..25d803a 100644
--- a/meson.build
+++ b/meson.build
@@ -10,34 +10,15 @@
 )
 
 conf_data = configuration_data()
-conf_data.set_quoted('POWER_DBUS_OBJECT_NAME',
-                 '/xyz/openbmc_project/Chassis/Buttons/Power0')
-conf_data.set_quoted('RESET_DBUS_OBJECT_NAME',
-                 '/xyz/openbmc_project/Chassis/Buttons/Reset0')
-conf_data.set_quoted('ID_DBUS_OBJECT_NAME',
-                 '/xyz/openbmc_project/Chassis/Buttons/ID0')
-conf_data.set_quoted('HS_DBUS_OBJECT_NAME',
-                 '/xyz/openbmc_project/Chassis/Buttons/HostSelector')
-conf_data.set_quoted('DBG_HS_DBUS_OBJECT_NAME',
-                 '/xyz/openbmc_project/Chassis/Buttons/DebugHostSelector')
-conf_data.set_quoted('SERIAL_CONSOLE_MUX_DBUS_OBJECT_NAME',
-                 '/xyz/openbmc_project/Chassis/Buttons/SerialUartMux')
-conf_data.set_quoted('GPIO_BASE_LABEL_NAME', '1e780000.gpio')
-conf_data.set_quoted('CHASSIS_STATE_OBJECT_NAME',
-                 '/xyz/openbmc_project/state/chassis')
-conf_data.set_quoted('CHASSISSYSTEM_STATE_OBJECT_NAME',
-                 '/xyz/openbmc_project/state/chassis_system')
-conf_data.set_quoted('HOST_STATE_OBJECT_NAME',
-                 '/xyz/openbmc_project/state/host')
 conf_data.set_quoted('ID_LED_GROUP', get_option('id-led-group'))
-
 conf_data.set_quoted('POWER_BUTTON_PROFILE', get_option('power-button-profile'))
-
 conf_data.set('LONG_PRESS_TIME_MS', get_option('long-press-time-ms'))
 conf_data.set('LOOKUP_GPIO_BASE', get_option('lookup-gpio-base').allowed())
 conf_data.set('ENABLE_RESET_BUTTON_DO_WARM_REBOOT', get_option('reset-button-do-warm-reboot').allowed())
 
-configure_file(output: 'config.hpp',
+configure_file(
+    input: 'meson_config.hpp.in',
+    output: 'config.hpp',
     configuration: conf_data
 )
 
diff --git a/meson_config.hpp.in b/meson_config.hpp.in
new file mode 100644
index 0000000..ed151f5
--- /dev/null
+++ b/meson_config.hpp.in
@@ -0,0 +1,28 @@
+#pragma once
+
+constexpr inline auto POWER_DBUS_OBJECT_NAME =
+    "/xyz/openbmc_project/Chassis/Buttons/Power0";
+constexpr inline auto RESET_DBUS_OBJECT_NAME =
+    "/xyz/openbmc_project/Chassis/Buttons/Reset0";
+constexpr inline auto ID_DBUS_OBJECT_NAME =
+    "/xyz/openbmc_project/Chassis/Buttons/ID0";
+constexpr inline auto HS_DBUS_OBJECT_NAME =
+    "/xyz/openbmc_project/Chassis/Buttons/HostSelector";
+constexpr inline auto DBG_HS_DBUS_OBJECT_NAME =
+    "/xyz/openbmc_project/Chassis/Buttons/DebugHostSelector";
+constexpr inline auto SERIAL_CONSOLE_MUX_DBUS_OBJECT_NAME =
+    "/xyz/openbmc_project/Chassis/Buttons/SerialUartMux";
+
+constexpr inline auto CHASSIS_STATE_OBJECT_NAME =
+    "/xyz/openbmc_project/state/chassis";
+constexpr inline auto CHASSISSYSTEM_STATE_OBJECT_NAME =
+    "/xyz/openbmc_project/state/chassis_system";
+constexpr inline auto HOST_STATE_OBJECT_NAME =
+    "/xyz/openbmc_project/state/host";
+
+constexpr inline auto GPIO_BASE_LABEL_NAME = "1e780000.gpio";
+#define LOOKUP_GPIO_BASE @LOOKUP_GPIO_BASE@
+
+constexpr inline auto POWER_BUTTON_PROFILE = @POWER_BUTTON_PROFILE@;
+constexpr inline auto ID_LED_GROUP = @ID_LED_GROUP@;
+constexpr inline const int LONG_PRESS_TIME_MS = @LONG_PRESS_TIME_MS@;