Files
SERiF/meson.build
Emily Boudreaux cb5ac274dc build(build): updated build system to be compatible with resource manager
The build system now passes compiler directives based on the mode being build. By default data is stored in the source root (and this is encoded into the compiled binary). However, if building in user mode then data is assumed to be at the meson install prefix data directory
2025-03-20 14:29:43 -04:00

31 lines
881 B
Meson

project('4DSSE', 'cpp', version: '0.0.1a', default_options: ['cpp_std=c++23'], meson_version: '>=1.6.0')
# Add default visibility for all C++ targets
add_project_arguments('-fvisibility=default', language: 'cpp')
# Determine the mode
mode = 1
if get_option('user_mode')
mode = 0
endif
# Define DATA_DIR based on mode
if mode == 1
data_dir = meson.project_source_root() + '/assets/dynamic'
else
data_dir = get_option('prefix') + '/' + get_option('datadir') + '/4DSSE'
endif
# Pass the DATA_DIR definition to the compiler
add_project_arguments('-DDATA_DIR=' + data_dir, language : 'cpp')
# Build external dependencies first so that all the embedded resources are available to the other targets
subdir('build-config')
subdir('subprojects/PicoSHA2')
subdir('assets/static')
# Build the main project
subdir('src')
if get_option('build_tests')
subdir('tests')
endif