diff --git a/build-config/libcomposition/meson.build b/build-config/libcomposition/meson.build index 26a4f92..ea1e027 100644 --- a/build-config/libcomposition/meson.build +++ b/build-config/libcomposition/meson.build @@ -1,4 +1,9 @@ -composition_p = subproject('libcomposition', default_options: ['pkg-config=' + pkg_config_bool_str]) +composition_p = subproject('libcomposition', + default_options: [ + 'pkg_config=' + get_option('pkg_config').to_string(), + 'build_tests=' + get_option('build_tests').to_string(), + 'build_examples=false' +]) comp_dep = composition_p.get_variable('composition_dep') libcomposition = composition_p.get_variable('libcomposition') spw_dep = composition_p.get_variable('species_weight_dep') @@ -7,4 +12,4 @@ composition_dep = [ spw_dep, ] -alias_target('build-libcomposition', libcomposition) \ No newline at end of file +alias_target('build-libcomposition', libcomposition) diff --git a/build-config/libconfig/meson.build b/build-config/libconfig/meson.build index bb8236b..7de01a1 100644 --- a/build-config/libconfig/meson.build +++ b/build-config/libconfig/meson.build @@ -1,5 +1,10 @@ -config_p = subproject('libconfig', default_options:['pkg-config=false']) +config_p = subproject('libconfig', + default_options:[ + 'pkg_config=' + get_option('pkg_config').to_string(), + 'build_tests=' + get_option('build_tests').to_string(), + 'build_examples=false' + ]) config_dep = config_p.get_variable('config_dep') libconfig = config_p.get_variable('libconfig') -alias_target('build-libconfig', libconfig) \ No newline at end of file +alias_target('build-libconfig', libconfig) diff --git a/build-config/libconstants/meson.build b/build-config/libconstants/meson.build index 3b86250..7257a03 100644 --- a/build-config/libconstants/meson.build +++ b/build-config/libconstants/meson.build @@ -1,4 +1,8 @@ -const_p = subproject('libconstants', default_options: ['pkg-config=' + pkg_config_bool_str]) +const_p = subproject('libconstants', default_options: [ + 'pkg_config=' + get_option('pkg_config').to_string(), + 'build_tests=' + get_option('build_tests').to_string(), + 'build_examples=false' + ]) const_dep = const_p.get_variable('const_dep') libconst = const_p.get_variable('libconst') diff --git a/build-config/liblogging/meson.build b/build-config/liblogging/meson.build index acceea0..f52b0de 100644 --- a/build-config/liblogging/meson.build +++ b/build-config/liblogging/meson.build @@ -1,4 +1,8 @@ -logging_p = subproject('liblogging', default_options: ['pkg-config=' + pkg_config_bool_str]) +logging_p = subproject('liblogging', default_options: [ + 'pkg_config=' + get_option('pkg_config').to_string(), + 'build_tests=' + get_option('build_tests').to_string(), + 'build_examples=false' + ]) liblogging = logging_p.get_variable('liblogging') logging_dep = logging_p.get_variable('logging_dep') @@ -6,4 +10,4 @@ quill_dep = logging_p.get_variable('quill_dep') log_dep = [logging_dep, quill_dep] -alias_target('build-liblogging', liblogging) \ No newline at end of file +alias_target('build-liblogging', liblogging) diff --git a/build-config/libplugin/meson.build b/build-config/libplugin/meson.build index f5bf5f8..5283a41 100644 --- a/build-config/libplugin/meson.build +++ b/build-config/libplugin/meson.build @@ -1,10 +1,10 @@ plugin_p = subproject('libplugin', default_options: [ - 'pkg-config=' + pkg_config_bool_str, - 'build-tests=' + get_option('build-tests').to_string(), - 'python-wheel=' + get_option('build-python').to_string(), + 'pkg-config=' + get_option('pkg_config').to_string(), + 'build-tests=' + get_option('build_tests').to_string(), + 'python-wheel=' + get_option('build_python').to_string(), ]) libplugin = plugin_p.get_variable('libplugin') plugin_dep = plugin_p.get_variable('plugin_dep') -alias_target('build-libplugin', libplugin) \ No newline at end of file +alias_target('build-libplugin', libplugin) diff --git a/build-config/meson.build b/build-config/meson.build index 1fb9a89..f56aa3b 100644 --- a/build-config/meson.build +++ b/build-config/meson.build @@ -1,19 +1,19 @@ -if get_option('build-lib-comp') or get_option('build-lib-all') or get_option('build-python') +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') +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') +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') +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') +if get_option('build_lib_plugin') or get_option('build_lib_all') subdir('libplugin') endif -if get_option('build-python') +if get_option('build_python') subdir('pybind') endif diff --git a/meson.build b/meson.build index ed307be..a32500d 100644 --- a/meson.build +++ b/meson.build @@ -1,18 +1,13 @@ -project('fourdst', 'cpp', version: 'v0.9.12', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0') +project('fourdst', 'cpp', version: 'v0.9.13', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0') add_project_arguments('-fvisibility=default', language: 'cpp') -pkg_config_bool_str = 'false' -if get_option('pkg-config') - pkg_config_bool_str = 'true' -endif - # Configure vendor libraries subdir('build-config') # Configure python bindings -if get_option('build-python') +if get_option('build_python') subdir('build-python') subdir('src-pybind') diff --git a/meson_options.txt b/meson_options.txt index 72e1a46..e64380e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,10 +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('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') +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('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')