diff --git a/subprojects/wren/meson.build b/subprojects/wren/meson.build index 1910874..b587790 100644 --- a/subprojects/wren/meson.build +++ b/subprojects/wren/meson.build @@ -5,6 +5,17 @@ project('wren', 'c', ) c_compiler = meson.get_compiler('c') +c_opts = [] +if get_option('wren_with_rand') + c_opts += '-DWREN_OPT_RANDOM=1' +else + c_opts += '-DWREN_OPT_RANDOM=0' +endif +if get_option('wren_with_meta') + c_opts += '-DWREN_OPT_META=1' +else + c_opts += '-DWREN_OPT_META=0' +endif wren_incl = include_directories('wren/src/include', is_system: true) wren_pvt_incl = include_directories('wren/src/vm', 'wren/src/optional') @@ -46,6 +57,7 @@ if force_static include_directories: [wren_incl, wren_pvt_incl], dependencies: [threads_dep, m_dep], install: not force_static, + c_args: c_opts, ) else wren = library(meson.project_name(), @@ -54,6 +66,7 @@ else include_directories: [wren_incl, wren_pvt_incl], dependencies: [threads_dep, m_dep], install: not force_static, + c_args: c_opts, ) endif wren_dep = declare_dependency( diff --git a/subprojects/wren/meson_options.txt b/subprojects/wren/meson_options.txt index 9e7a81f..1181c76 100644 --- a/subprojects/wren/meson_options.txt +++ b/subprojects/wren/meson_options.txt @@ -1,2 +1,4 @@ option('build_testing', type: 'boolean', value: false) option('wren_with_cli', type: 'boolean', value: true) +option('wren_with_rand', type: 'boolean', value: false) +option('wren_with_meta', type: 'boolean', value: false)