wrenpp/meson.build

69 lines
1.5 KiB
Meson
Raw Normal View History

project('wrenpp', 'cpp',
2022-05-15 23:09:49 +02:00
version: '0.1.3',
meson_version: '>=0.49.2',
default_options: ['buildtype=release', 'cpp_std=c++20', 'b_ndebug=if-release']
)
wren_dep = dependency('wren', version: '>=0.2.0',
fallback: ['wren', 'wren_dep'],
default_options: [
'default_library=static',
'build_testing=false',
2020-05-01 21:14:01 +02:00
'wren_with_rand=' + get_option('wren_with_rand').to_string(),
'wren_with_meta=' + get_option('wren_with_meta').to_string(),
],
static: true,
)
public_incl = [include_directories('include')]
os = host_machine.system()
if os == 'gnu'
os = 'hurd'
elif os == 'linux'
os = 'gnu'
endif
arch = host_machine.cpu_family()
if arch == 'x86_64'
arch = 'amd64'
endif
ptr_size = 0
func_ptr_size = 0
conf = configuration_data()
if os == 'gnu' and arch == 'amd64'
ptr_size = 8
func_ptr_size = 8
2022-04-24 03:41:14 +02:00
elif os == 'gnu' and arch == 'aarch64'
ptr_size = 8
func_ptr_size = 8
endif
compiler_opts = []
if get_option('wrenpp_with_name_guessing')
compiler_opts += ['-DWRENPP_WITH_NAME_GUESSING']
endif
if get_option('wrenpp_with_sse42')
2022-06-03 10:52:26 +02:00
if arch == 'amd64'
compiler_opts += ['-msse4.2']
elif arch == 'aarch64'
compiler_opts += ['-mcpu=generic+crc']
endif
endif
conf.set('POINTER_SIZE', ptr_size)
conf.set('FUNC_POINTER_SIZE', func_ptr_size)
2021-02-10 23:14:13 +01:00
conf.set('WRENPP_NAME', meson.project_name())
conf.set('WRENPP_WITH_SSE42', get_option('wrenpp_with_sse42'))
subdir('include')
2022-06-03 11:07:35 +02:00
subdir('src')
2020-05-02 22:41:58 +02:00
if get_option('build_examples')
subdir('examples')
endif
if get_option('build_testing')
subdir('test')
endif