FluxEngine/meson.build
2025-05-06 16:59:40 +01:00

42 lines
971 B
Meson

project(
'FluxEngine',
'cpp',
version : '0.1.0',
meson_version : '>=0.63.0',
default_options : [
'cpp_std=c++20',
'warning_level=3',
'buildtype=debugoptimized',
]
)
# 1) Grab the active C++ compiler
cpp = meson.get_compiler('cpp')
ccid = cpp.get_id() # e.g. 'msvc', 'gcc', 'clang', 'intel', ...
# 2) Decide your D-flag prefix
if ccid == 'msvc'
dflag = '/D'
else
dflag = '-D'
endif
if meson.get_compiler('cpp').get_id() == 'msvc'
add_project_arguments('/utf-8', language: 'cpp')
endif
# 4) Build-type macros
bt = get_option('buildtype')
if bt == 'debug'
add_project_arguments(dflag + 'FLUX_DEBUG', language : 'cpp')
elif bt == 'release'
add_project_arguments(dflag + 'FLUX_RELEASE', language : 'cpp')
elif bt == 'debugoptimized'
add_project_arguments(dflag + 'FLUX_DIST', language : 'cpp')
else
warning('Unrecognized buildtype: ' + bt)
endif
# Tell Meson to descend into these directories
subdir('FluxEngine')
subdir('Sandbox')