Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@
"fmt"
],
"versions": [
"11.2.0-2",
"11.2.0-1",
"11.1.4-1",
"11.1.1-2",
Expand Down
55 changes: 25 additions & 30 deletions subprojects/packagefiles/fmt/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
'fmt',
'cpp',
version: '11.2.0',
meson_version: '>=0.50.0',

Check notice on line 5 in subprojects/packagefiles/fmt/meson.build

View workflow job for this annotation

GitHub Actions / Ubuntu (x86_64)

Minimum Meson version is 0.50.0

0.38.0: build_by_default arg in library 0.46.0: pkgconfig.generate optional positional argument 0.50.0: include_directories kwarg of type string
license: 'MIT WITH fmt-exception',
default_options: ['cpp_std=c++14'],
)

fmt_private_cpp_args = []
Expand All @@ -15,40 +15,35 @@

header_only = get_option('header-only')

fmt_lib = library(
'fmt',
'src/format.cc',
'src/os.cc',
cpp_args: fmt_private_cpp_args,
include_directories: 'include',
build_by_default: not header_only,
install: not header_only,
)

if not header_only
if header_only
fmt_header_only_dep = declare_dependency(
include_directories: 'include',
compile_args: '-DFMT_HEADER_ONLY',
)
else
fmt_lib = library(
'fmt',
'src/format.cc',
'src/os.cc',
cpp_args: fmt_private_cpp_args,
override_options: 'cpp_std=c++14',
include_directories: 'include',
build_by_default: true,
install: true,
)
install_subdir(
'include',
strip_directory: true,
install_dir: get_option('includedir'),
)
endif

fmt_dep = declare_dependency(
include_directories: 'include',
compile_args: fmt_interface_cpp_args,
link_with: fmt_lib,
)

if meson.version().version_compare('>=0.54.0')
meson.override_dependency('fmt', fmt_dep)
endif

fmt_header_only_dep = declare_dependency(
include_directories: 'include',
compile_args: '-DFMT_HEADER_ONLY',
)

if not header_only
fmt_dep = declare_dependency(
include_directories: 'include',
compile_args: fmt_interface_cpp_args,
link_with: fmt_lib,
)
if meson.version().version_compare('>=0.54.0')
meson.override_dependency('fmt', fmt_dep)
endif
pkg_mod = import('pkgconfig')
pkg_mod.generate(
fmt_lib,
Expand Down
Loading