#### Build Starts Here
LIBS_BUILT_SO_FAR = []
+TARGETS_GEN_MESSAGES = []
subdir('tools')
subdir('src')
subdir('fuzz')
subdir('premium')
endif
+alias_target('all-targets-gen-messages', TARGETS_GEN_MESSAGES)
+
+top_docs = [
+ 'AUTHORS',
+ 'COPYING',
+ 'ChangeLog',
+ 'README',
+ 'CONTRIBUTING.md',
+ 'SECURITY.md',
+ 'platforms.rst',
+ 'code_of_conduct.md',
+]
+install_data(top_docs, install_dir: 'share/doc/kea')
install_emptydir('var/run/kea')
link_with: [agent_lib] + LIBS_BUILT_SO_FAR,
)
subdir('tests')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-bin-agent-ca_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/ca_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
link_with: [dhcp4_lib] + LIBS_BUILT_SO_FAR,
)
subdir('tests')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-bin-dhcp4-dhcp4_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/dhcp4_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
link_with: [dhcp6_lib] + LIBS_BUILT_SO_FAR,
)
subdir('tests')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-bin-dhcp6-dhcp6_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/dhcp6_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
link_with: [lfc_lib] + LIBS_BUILT_SO_FAR,
)
subdir('tests')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-bin-lfc-lfc_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/lfc_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
)
subdir('tests')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-bin-netconf-netconf_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/netconf_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
)
subdir('libloadtests')
subdir('tests')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-hooks-dhcp-bootp-bootp_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/bootp_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
)
subdir('libloadtests')
subdir('tests')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-hooks-dhcp-flex_option-flex_option_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/flex_option_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
)
subdir('libloadtests')
subdir('tests')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-hooks-dhcp-high_availability-ha_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/ha_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
)
subdir('libloadtests')
subdir('tests')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-hooks-dhcp-lease_cmds-lease_cmds_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/lease_cmds_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
)
subdir('libloadtests')
subdir('tests')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-hooks-dhcp-mysql-mysql_cb_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/mysql_cb_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+ target_gen_messages = run_target(
+ 'src-hooks-dhcp-mysql-mysql_hb_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/mysql_hb_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+ target_gen_messages = run_target(
+ 'src-hooks-dhcp-mysql-mysql_lb_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/mysql_lb_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
)
subdir('libloadtests')
subdir('tests')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-hooks-dhcp-perfmon-perfmon_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/perfmon_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
)
subdir('libloadtests')
subdir('tests')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-hooks-dhcp-pgsql-pgsql_cb_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/pgsql_cb_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+ target_gen_messages = run_target(
+ 'src-hooks-dhcp-pgsql-pgsql_hb_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/pgsql_hb_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+ target_gen_messages = run_target(
+ 'src-hooks-dhcp-pgsql-pgsql_lb_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/pgsql_lb_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
# Do tests first
subdir('tests')
subdir('libloadtests')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-hooks-dhcp-run_script-run_script_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/run_script_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
)
subdir('libloadtests')
subdir('tests')
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-hooks-dhcp-stat_cmds-stat_cmds_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/stat_cmds_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
objects: dhcp_user_chk_lib.extract_all_objects(recursive: false),
)
subdir('tests')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-hooks-dhcp-user_chk-user_chk_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/user_chk_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
subdir('tests')
kea_asiodns_headers = ['asiodns_messages.h', 'io_fetch.h', 'logger.h']
install_headers(kea_asiodns_headers, preserve_path: true, subdir: 'kea/asiodns')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-lib-asiodns-asiodns_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/asiodns_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
'unix_command_mgr.h',
]
install_headers(kea_config_headers, preserve_path: true, subdir: 'kea/config')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-lib-config-config_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/config_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
'nc_trans.h',
]
install_headers(kea_d2srv_headers, preserve_path: true, subdir: 'kea/d2srv')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-lib-d2srv-d2_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/d2_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
preserve_path: true,
subdir: 'kea/database',
)
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-lib-database-db_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/db_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
preserve_path: true,
subdir: 'kea/dhcp_ddns',
)
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-lib-dhcp_ddns-dhcp_ddns_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/dhcp_ddns_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
'writable_host_data_source.h',
]
install_headers(kea_dhcpsrv_headers, preserve_path: true, subdir: 'kea/dhcpsrv')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-lib-dhcpsrv-alloc_engine_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/alloc_engine_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+ target_gen_messages = run_target(
+ 'src-lib-dhcpsrv-dhcpsrv_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/dhcpsrv_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+ target_gen_messages = run_target(
+ 'src-lib-dhcpsrv-hosts_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/hosts_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+ target_gen_messages = run_target(
+ 'src-lib-dhcpsrv-fuzz_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/fuzz_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
'token.h',
]
install_headers(kea_eval_headers, preserve_path: true, subdir: 'kea/eval')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-lib-eval-eval_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/eval_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
'server_hooks.h',
]
install_headers(kea_hooks_headers, preserve_path: true, subdir: 'kea/hooks')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-lib-hooks-hooks_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/hooks_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
'url.h',
]
install_headers(kea_http_headers, preserve_path: true, subdir: 'kea/http')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-lib-http-auth_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/auth_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+ target_gen_messages = run_target(
+ 'src-lib-http-http_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/http_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
-executable('kea-msg-compiler',
- 'message.cc',
- include_directories: [include_directories('.')] + INCLUDES,
- link_with : LIBS_BUILT_SO_FAR,
- install : true,
+if meson.is_cross_build()
+ HAS_KEA_MSG_COMPILER = false
+ subdir_done()
+endif
+
+kea_msg_compiler = executable(
+ 'kea-msg-compiler',
+ 'message.cc',
+ include_directories: INCLUDES,
+ install_dir: 'bin',
+ link_with: LIBS_BUILT_SO_FAR,
)
+HAS_KEA_MSG_COMPILER = true
link_with: LIBS_BUILT_SO_FAR,
)
LIBS_BUILT_SO_FAR = [kea_log_lib] + LIBS_BUILT_SO_FAR
+subdir('compiler')
subdir('tests')
kea_log_headers = [
'buffer_appender_impl.h',
'output_option.h',
]
install_headers(kea_log_headers, preserve_path: true, subdir: 'kea/log')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-lib-log-log_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/log_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+ target_gen_messages = run_target(
+ 'src-lib-log-logimpl_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/logimpl_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
priority: -1,
)
endforeach
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-lib-log-tests-log_test_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/log_test_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
'redact_config.h',
]
install_headers(kea_process_headers, preserve_path: true, subdir: 'kea/process')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-lib-process-process_messages',
+ command: [
+ kea_msg_compiler,
+ f'@current_source_dir@/process_messages.mes',
+ ],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif
'tcp_stream_msg.h',
]
install_headers(kea_tcp_headers, preserve_path: true, subdir: 'kea/tcp')
+
+if HAS_KEA_MSG_COMPILER
+ current_source_dir = meson.current_source_dir()
+ target_gen_messages = run_target(
+ 'src-lib-tcp-tcp_messages',
+ command: [kea_msg_compiler, f'@current_source_dir@/tcp_messages.mes'],
+ )
+ TARGETS_GEN_MESSAGES += [target_gen_messages]
+endif