diff --git a/README.md b/README.md index f74f70b4dc..6cd17330c5 100644 --- a/README.md +++ b/README.md @@ -178,9 +178,11 @@ sudo xbps-install meson ninja pkg-config git \ polkit-devel librsvg-devel libqalculate-devel libxml2-devel jemalloc-devel ``` -Vendored dependencies, with no system package needed: `Wuffs`, `tomlplusplus`, +Vendored dependencies, with no system package needed: `Wuffs`, `nlohmann/json`, `Luau`, `dr_wav`, `fzy`, `stb_image_resize2`, and Material Color Utilities. +Dependencies that are vendored by default, with a meson option to instead use the system package: `tomlplusplus` + System packages required beyond the Wayland/GL stack: `libwebp` handles WebP decoding and thumbnail encoding. Wuffs handles the other supported raster image formats. `libqalculate` powers the launcher calculator (arithmetic, unit and currency conversion). diff --git a/meson.build b/meson.build index 7ca6b143bb..b8cc2c1bea 100644 --- a/meson.build +++ b/meson.build @@ -177,6 +177,15 @@ stb_dep = declare_dependency( include_directories: include_directories('third_party/stb', is_system: true), ) +# ── Vendored: tomlplusplus (header-only) ───────────────────────────────── +if get_option('system_tomlplusplus') + tomlplusplus_dep = dependency('tomlplusplus') +else + tomlplusplus_dep = declare_dependency( + include_directories: include_directories('third_party/tomlplusplus', is_system: true), + ) +endif + # ── Vendored: md4c (CommonMark parser) ─────────────────────────────────────── _md4c_lib = static_library('md4c', 'third_party/md4c/md4c.c', @@ -875,7 +884,6 @@ endif # ── Include directories ──────────────────────────────────────────────────────── _noctalia_inc = [ include_directories('src'), - include_directories('third_party/tomlplusplus', is_system: true), include_directories('third_party/wuffs', is_system: true), # nlohmann is header-only and uses GCC extensions in some paths; treat as system. include_directories('third_party/nlohmann', is_system: true), @@ -917,6 +925,7 @@ noctalia_exe = executable('noctalia', mcu_dep, libxml2_dep, stb_dep, + tomlplusplus_dep, md4c_dep, libwebp_dep, luau_dep, @@ -1269,6 +1278,9 @@ plugin_manifest_test = executable('plugin_manifest_test', 'src/core/log.cpp', ), include_directories: _noctalia_inc, + dependencies: [ + tomlplusplus_dep, + ], ) test('plugin_manifest', plugin_manifest_test) @@ -1308,7 +1320,10 @@ config_schema_roundtrip_test = executable('config_schema_roundtrip_test', 'src/core/key_chord.cpp', ), include_directories: _noctalia_inc, - dependencies: [xkbcommon_dep], + dependencies: [ + xkbcommon_dep, + tomlplusplus_dep, + ], ) test('config_schema_roundtrip', config_schema_roundtrip_test) @@ -1327,7 +1342,10 @@ config_widget_test = executable('config_widget_test', 'src/core/key_chord.cpp', ), include_directories: _noctalia_inc, - dependencies: [xkbcommon_dep], + dependencies: [ + xkbcommon_dep, + tomlplusplus_dep, + ], ) test('config_widget', config_widget_test) @@ -1347,7 +1365,10 @@ config_path_resolution_test = executable('config_path_resolution_test', 'src/core/key_chord.cpp', ), include_directories: _noctalia_inc, - dependencies: [xkbcommon_dep], + dependencies: [ + xkbcommon_dep, + tomlplusplus_dep, + ], ) test('config_path_resolution', config_path_resolution_test) @@ -1373,6 +1394,9 @@ state_store_test = executable('state_store_test', 'src/core/log.cpp', ), include_directories: _noctalia_inc, + dependencies: [ + tomlplusplus_dep, + ], ) test('state_store', state_store_test) diff --git a/meson_options.txt b/meson_options.txt index 8b715a194e..042263d122 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,2 +1,3 @@ option('jemalloc', type: 'feature', value: 'auto', description: 'Use jemalloc on glibc builds') option('tests', type: 'feature', value: 'auto', description: 'Build unit tests (auto: on for unsanitized debug builds)') +option('system_tomlplusplus', type: 'boolean', value: false, description: 'Use system tomlplusplus instead of vendored') diff --git a/src/core/toml.h b/src/core/toml.h index efb2d3a373..903e3b6b20 100644 --- a/src/core/toml.h +++ b/src/core/toml.h @@ -4,5 +4,5 @@ #pragma GCC diagnostic ignored "-Wshadow" #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wsign-conversion" -#include +#include #pragma GCC diagnostic pop diff --git a/src/shell/greeter/greeter_appearance_sync.cpp b/src/shell/greeter/greeter_appearance_sync.cpp index 6da7f37ee0..6db11a595e 100644 --- a/src/shell/greeter/greeter_appearance_sync.cpp +++ b/src/shell/greeter/greeter_appearance_sync.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include namespace { diff --git a/third_party/tomlplusplus/toml.hpp b/third_party/tomlplusplus/toml++/toml.hpp similarity index 100% rename from third_party/tomlplusplus/toml.hpp rename to third_party/tomlplusplus/toml++/toml.hpp