Skip to content

Commit

Permalink
Merge pull request #55 from seldon-code/fixForBindings
Browse files Browse the repository at this point in the history
BLD: Add fmt,tomlpp subprojects
  • Loading branch information
HaoZeke authored Aug 24, 2024
2 parents 3ba2520 + a07a30c commit b4c479a
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# We can store explicitly what we need
/subprojects/
!/subprojects/fmt.wrap
!/subprojects/argparse.wrap
!/subprojects/tomlplusplus.wrap
*.txt

.cache/
Expand Down
11 changes: 9 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ _args = [] # Extra arguments


_incdir += include_directories('include')
_deps += [dependency('fmt'), dependency('tomlplusplus')]

fmt_subproj = subproject('fmt', default_options: ['default_library=static'])
_deps += fmt_subproj.get_variable('fmt_dep')

tomlplusplus_subproj = subproject('tomlplusplus', default_options: ['default_library=static'])
_deps += tomlplusplus_subproj.get_variable('tomlplusplus_dep')

_args += cppc.get_supported_arguments(['-Wno-unused-local-typedefs', '-Wno-array-bounds'])

sources_seldon = [
Expand Down Expand Up @@ -51,6 +57,7 @@ seldon_shared_dep = declare_dependency(include_directories : _incdir,
# ------------------------------------

if get_option('build_exe')
_deps += subproject('argparse').get_variable('argparse_dep')
exe = executable('seldon', sources_seldon + 'src/main.cpp',
install : true,
dependencies : _deps,
Expand Down Expand Up @@ -85,4 +92,4 @@ if get_option('build_tests')
)
test(t.get(0), exe, workdir : meson.project_source_root())
endforeach
endif
endif
13 changes: 13 additions & 0 deletions subprojects/argparse.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[wrap-file]
directory = argparse-3.0
source_url = https://github.com/p-ranav/argparse/archive/refs/tags/v3.0.tar.gz
source_filename = argparse-3.0.tar.gz
source_hash = ba7b465759bb01069d57302855eaf4d1f7d677f21ad7b0b00b92939645c30f47
patch_filename = argparse_3.0-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/argparse_3.0-1/get_patch
patch_hash = f83ed766f07c830d3922676c67959f2078a055c07bd360f19e0e114d375d1037
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/argparse_3.0-1/argparse-3.0.tar.gz
wrapdb_version = 3.0-1

[provide]
argparse = argparse_dep
13 changes: 13 additions & 0 deletions subprojects/fmt.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[wrap-file]
directory = fmt-11.0.1
source_url = https://github.com/fmtlib/fmt/archive/11.0.1.tar.gz
source_filename = fmt-11.0.1.tar.gz
source_hash = 7d009f7f89ac84c0a83f79ed602463d092fbf66763766a907c97fd02b100f5e9
patch_filename = fmt_11.0.1-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/fmt_11.0.1-1/get_patch
patch_hash = 0a8b93d1ee6d84a82d3872a9bfb4c3977d8a53f7f484d42d1f7ed63ed496d549
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/fmt_11.0.1-1/fmt-11.0.1.tar.gz
wrapdb_version = 11.0.1-1

[provide]
fmt = fmt_dep
10 changes: 10 additions & 0 deletions subprojects/tomlplusplus.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[wrap-file]
directory = tomlplusplus-3.4.0
source_url = https://github.com/marzer/tomlplusplus/archive/v3.4.0.tar.gz
source_filename = tomlplusplus-3.4.0.tar.gz
source_hash = 8517f65938a4faae9ccf8ebb36631a38c1cadfb5efa85d9a72e15b9e97d25155
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/tomlplusplus_3.4.0-1/tomlplusplus-3.4.0.tar.gz
wrapdb_version = 3.4.0-1

[provide]
dependency_names = tomlplusplus

0 comments on commit b4c479a

Please sign in to comment.