feat(meson): More granular build options

fourdst's build system now exposes some options to allow fine grained
control of what is built and what is not
This commit is contained in:
2025-11-28 11:00:51 -05:00
parent 6e489d15e5
commit ab2ae12281
4 changed files with 33 additions and 12 deletions

View File

@@ -1,6 +1,19 @@
subdir('libcomposition')
subdir('libconfig')
subdir('libconstants')
subdir('liblogging')
subdir('libplugin')
subdir('pybind')
if get_option('build-lib-comp') or get_option('build-lib-all') or get_option('build-python')
subdir('libcomposition')
endif
if get_option('build-lib-config') or get_option('build-lib-all') or get_option('build-python')
subdir('libconfig')
endif
if get_option('build-lib-const') or get_option('build-lib-all') or get_option('build-python')
subdir('libconstants')
endif
if get_option('build-lib-log') or get_option('build-lib-all')
subdir('liblogging')
endif
if get_option('build-lib-plugin') or get_option('build-lib-all')
subdir('libplugin')
endif
if get_option('build-python')
subdir('pybind')
endif

View File

@@ -1,4 +1,4 @@
project('fourdst', 'cpp', version: 'v0.9.8', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
project('fourdst', 'cpp', version: 'v0.9.9', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
add_project_arguments('-fvisibility=default', language: 'cpp')
@@ -12,8 +12,9 @@ endif
subdir('build-config')
# Configure python bindings
subdir('build-python')
if get_option('build-python')
subdir('build-python')
# Build python bindings
subdir('src-pybind')
subdir('src-pybind')
endif

View File

@@ -1,3 +1,10 @@
option('pkg-config', type: 'boolean', value: false, description: 'generate pkg-config file for all libraries and fourdst (defaults to false to allow easy pip building)')
option('electron-build-py-backend', type: 'boolean', value: false, description: 'use pyinstaller to build the python backend for the electron app')
option('tests', type: 'boolean', value: false, description: 'compile subproject tests')
option('build-tests', type: 'boolean', value: false, description: 'compile subproject tests')
option('build-lib-all', type: 'boolean', value: true, description: 'build the full fourdst library with all features enabled')
option('build-lib-comp', type: 'boolean', value: false, description: 'build the minimal fourdst library with only compression and decompression features enabled')
option('build-lib-config', type: 'boolean', value: false, description: 'build the fourdst library configuration tool only')
option('build-lib-const', type: 'boolean', value: false, description: 'build the fourdst library constants only')
option('build-python', type: 'boolean', value: true, description: 'build the python bindings so you can use fourdst from python. This will also build libcomposition, libconfig, and libconstants')
option('build-lib-log', type: 'boolean', value: false, description: 'build the fourdst library logging features only')
option('build-lib-plugin', type: 'boolean', value: false, description: 'build the fourdst plugin module only')

View File

@@ -1,4 +1,4 @@
[wrap-git]
url = https://github.com/4D-STAR/libplugin.git
revision = v0.3.5
revision = v0.3.6
depth = 1