Skip to content

Commit

Permalink
add new wrap: "cpp-semver"
Browse files Browse the repository at this point in the history
  • Loading branch information
Totto16 authored and dcbaker committed Apr 27, 2024
1 parent 809dfc7 commit 715f46b
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 0 deletions.
8 changes: 8 additions & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,14 @@
"0.8.9-1"
]
},
"cpp-semver": {
"dependency_names": [
"cpp-semver"
],
"versions": [
"0.3.3-1"
]
},
"cpputest": {
"dependency_names": [
"cpputest"
Expand Down
10 changes: 10 additions & 0 deletions subprojects/cpp-semver.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[wrap-file]
directory = cpp-semver-0.3.3
source_url = https://github.com/z4kn4fein/cpp-semver/archive/refs/tags/v0.3.3.tar.gz
source_filename = cpp-semver-0.3.3.tar.gz
source_hash = 05d59da347b5b5b4f34670d32704a54219657c9856a7af6645f06064006c6c68
patch_directory = cpp-semver

[provide]
cpp-semver = cpp_semver_dep

26 changes: 26 additions & 0 deletions subprojects/packagefiles/cpp-semver/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
project(
'cpp-semver',
'cpp',
version: '0.3.3',
license: 'MIT',
meson_version: '>=1.2.0',
default_options: {
'cpp_std': ['c++17'],
},
)

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

cpp_semver_dep = declare_dependency(
include_directories: include_directories('include'),
version: meson.project_version(),
)

meson.override_dependency('cpp-semver', cpp_semver_dep)

if get_option('tests')
subdir('test')
endif
8 changes: 8 additions & 0 deletions subprojects/packagefiles/cpp-semver/meson.options
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@


option(
'tests',
type: 'boolean',
value: true,
description: 'whether or not tests should be built',
)
20 changes: 20 additions & 0 deletions subprojects/packagefiles/cpp-semver/test/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
test_files = files(
'compare.cpp',
'increment.cpp',
'prerelease.cpp',
'serialization.cpp',
'version.cpp',
)

catch2_dep = dependency('catch2-with-main')

tests_exe = executable(
'cpp_semver_tests',
test_files,
dependencies: [cpp_semver_dep, catch2_dep],
)

test('cpp_semver_tests', tests_exe)



0 comments on commit 715f46b

Please sign in to comment.