bubel-ecs/meson.build
Mergul 13e6ed8fd5 ECS core imprevement
-Adedd function to resize array to Mallocator
-significant speed up for first time ID allocation by using resizeArray instead of makeArray
-fix: onUpdate called with zero length arrays
-call updateBlocks before updateEvents (it's more accurate behaviour)
-some minore fixes
-fixed meson.build for GDC
2020-06-06 22:26:59 +02:00

73 lines
1.6 KiB
Meson

project('DECS', 'd')
src = [
'source/bubel/ecs/atomic.d',
'source/bubel/ecs/attributes.d',
'source/bubel/ecs/block_allocator.d',
'source/bubel/ecs/core.d',
'source/bubel/ecs/entity.d',
'source/bubel/ecs/events.d',
'source/bubel/ecs/hash_map.d',
'source/bubel/ecs/id_manager.d',
'source/bubel/ecs/manager.d',
'source/bubel/ecs/package.d',
'source/bubel/ecs/simple_vector.d',
'source/bubel/ecs/std.d',
'source/bubel/ecs/system.d',
'source/bubel/ecs/traits.d',
'source/bubel/ecs/vector.d'
]
tests_src = [
'tests/tests.d'
]
betterC_opt = get_option('betterC')
BuildDemos_opt = get_option('BuildDemos')
LTO_otp = get_option('LTO')
comp = meson.get_compiler('d')
comp_id = comp.get_id()
args = []
link_args = []
if comp_id == 'gcc'
args += '-pthread'
link_args += '-pthread'
endif
if LTO_otp
if comp_id == 'gcc'
args += '-flto'
link_args += '-flto'
elif comp_id == 'llvm'
args += '-flto=thin'
link_args += '-flto=thin'
else
message('LTO don\'t work with DMD')
endif
endif
if betterC_opt
if comp_id == 'gcc'
args += ['-fno-druntime']
link_args += ['-fno-druntime']
else
args += '-betterC'
link_args += '-betterC'
endif
endif
inc = include_directories('source/')
tests_inc = include_directories('source/')
ecs_lib = library('ecs', src, include_directories : [tests_inc, inc], d_args: args, link_args: link_args)
executable('tests', tests_src, include_directories : [tests_inc, inc], d_args: args, link_args: link_args, link_with: ecs_lib)
if BuildDemos_opt
subdir('demos/utils')
subdir('demos')
endif