From: Michal Sojka Date: Mon, 12 Nov 2018 09:10:31 +0000 (+0100) Subject: meson build: Properly handle generation of orte_config.h X-Git-Url: http://rtime.felk.cvut.cz/gitweb/orte.git/commitdiff_plain/b55f1827596f449d3aa9a95477da31bd3a1e01a0 meson build: Properly handle generation of orte_config.h By properly we mean copying the existing template for now. Later, we may generate the config by letting meson detect the needed features and generate the whole config automatically. --- diff --git a/orte/include/meson.build b/orte/include/meson.build index d92381e..10e5571 100644 --- a/orte/include/meson.build +++ b/orte/include/meson.build @@ -2,13 +2,5 @@ install_headers( 'orte.h', ) -install_headers( - 'orte/basic_types.h', - 'orte/cdr.h', - 'orte/defines_api.h', - 'orte/protos_api.h', - 'orte/typedefs_api.h', - 'orte/typedefs_defines_rtps.h', - subdir: 'orte', -) -# TODO: rename config and install it to orte/orte_config.h + +subdir('orte') diff --git a/orte/include/orte/meson.build b/orte/include/orte/meson.build new file mode 100644 index 0000000..3881fff --- /dev/null +++ b/orte/include/orte/meson.build @@ -0,0 +1,26 @@ +install_headers( + 'basic_types.h', + 'cdr.h', + 'defines_api.h', + 'protos_api.h', + 'typedefs_api.h', + 'typedefs_defines_rtps.h', + subdir: 'orte', +) + +if (host_machine.system() == 'windows') + orte_config_src = 'orte_config_omk_win32.h' +elif (host_machine.system() == 'linux') + orte_config_src = 'orte_config_omk_linux.h' +else + orte_config_src = 'orte_config_omk_linux.h' +endif + +orte_config_h = custom_target( + 'orte_config.h', + input : orte_config_src, + output : 'orte_config.h', + command : ['cp', '@INPUT@', '@OUTPUT@'], + install: true, + install_dir: 'include/orte', +) diff --git a/orte/liborte/meson.build b/orte/liborte/meson.build index be371b7..adb6675 100644 --- a/orte/liborte/meson.build +++ b/orte/liborte/meson.build @@ -1,18 +1,9 @@ liborte_args = [] -if (host_machine.system() == 'windows') - liborte_args += ['-include', 'orte/orte_config_omk_win32.h'] -elif (host_machine.system() == 'linux') - liborte_args += ['-include', 'orte/orte_config_omk_linux.h'] -else - liborte_args += ['-include', 'orte/orte_config_omk_linux.h'] -endif - - - liborte = library( 'orte', [ + orte_config_h, 'conv.c', 'debug.c', 'event.c',