Skip to content

Commit

Permalink
fmt: cygwin test
Browse files Browse the repository at this point in the history
Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Nov 16, 2023
1 parent d3a154a commit 51b29fe
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 5 deletions.
6 changes: 1 addition & 5 deletions subprojects/fmt.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ directory = fmt-10.1.1
source_url = https://github.com/fmtlib/fmt/archive/10.1.1.tar.gz
source_filename = fmt-10.1.1.tar.gz
source_hash = 78b8c0a72b1c35e4443a7e308df52498252d1cefc2b08c9a97bc9ee6cfe61f8b
patch_filename = fmt_10.1.1-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/fmt_10.1.1-1/get_patch
patch_hash = adec33acaf87c0859c52b242a44bc71c3427751da3f1adaed511f4186794a42f
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/fmt_10.1.1-1/fmt-10.1.1.tar.gz
wrapdb_version = 10.1.1-1
patch_directory = fmt

[provide]
fmt = fmt_dep
43 changes: 43 additions & 0 deletions subprojects/packagefiles/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
project('fmt', 'cpp', version: '10.1.1', license: 'BSD', default_options: ['cpp_std=c++14'])

fmt_private_cpp_args = ['-D_GNU_SOURCE']
fmt_interface_cpp_args = []
if get_option('default_library') == 'shared'
fmt_private_cpp_args += ['-DFMT_LIB_EXPORT']
fmt_interface_cpp_args += ['-DFMT_SHARED']
endif

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

install_subdir('include',
strip_directory: true,
install_dir: get_option('includedir'),
)

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',
)

pkg_mod = import('pkgconfig')
pkg_mod.generate(fmt_lib,
name: 'fmt',
filebase: 'fmt',
)

0 comments on commit 51b29fe

Please sign in to comment.