2025-02-14 14:32:05 -05:00
|
|
|
project('4DSSE', 'cpp', version: '0.0.1a', default_options: ['cpp_std=c++23'], meson_version: '>=1.6.0')
|
2025-01-19 07:38:58 -05:00
|
|
|
|
|
|
|
|
# Add default visibility for all C++ targets
|
|
|
|
|
add_project_arguments('-fvisibility=default', language: 'cpp')
|
2025-03-20 14:29:43 -04:00
|
|
|
# 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')
|
2025-01-19 07:38:58 -05:00
|
|
|
|
2025-02-16 15:09:22 -05:00
|
|
|
# Build external dependencies first so that all the embedded resources are available to the other targets
|
2025-02-12 16:24:13 -05:00
|
|
|
subdir('build-config')
|
2025-01-19 07:38:58 -05:00
|
|
|
|
2025-03-20 14:29:43 -04:00
|
|
|
subdir('assets/static')
|
|
|
|
|
|
2025-02-12 16:24:13 -05:00
|
|
|
# Build the main project
|
2025-01-19 07:38:58 -05:00
|
|
|
subdir('src')
|
2025-01-19 12:24:54 -05:00
|
|
|
if get_option('build_tests')
|
|
|
|
|
subdir('tests')
|
2025-03-24 05:06:40 -04:00
|
|
|
endif
|
2025-04-30 11:41:10 -04:00
|
|
|
|
|
|
|
|
if get_option('build_python')
|
|
|
|
|
subdir('build-python')
|
|
|
|
|
endif
|