Verified Commit fbe1e517 authored by David Runge's avatar David Runge
Browse files

Allow system cpptoml

meson.build:
When the 'wrap_mode' option is set to 'nodownload' use a system version
of cpptoml. This does not require using git and having a network
connection during build, which is important for Linux packaging
infrastructure.

subprojects/cpptoml.wrap:
Pin revision to last release tag (v0.1.1).

lib/wptoml/*.cpp:
Remove 'include/' prefix from all cpptoml related includes, at is not
required.

Closes #17
parent 4eb853ca
Pipeline #180699 passed with stages
in 1 minute and 12 seconds
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <functional> #include <functional>
/* CPPTOML */ /* CPPTOML */
#include <include/cpptoml.h> #include <cpptoml.h>
/* TOML */ /* TOML */
#include "private.h" #include "private.h"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
*/ */
/* CPPTOML */ /* CPPTOML */
#include <include/cpptoml.h> #include <cpptoml.h>
/* TOML */ /* TOML */
#include "private.h" #include "private.h"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <functional> #include <functional>
/* CPPTOML */ /* CPPTOML */
#include <include/cpptoml.h> #include <cpptoml.h>
/* TOML */ /* TOML */
#include "private.h" #include "private.h"
......
...@@ -26,9 +26,13 @@ else ...@@ -26,9 +26,13 @@ else
wireplumber_config_dir = join_paths(get_option('prefix'), get_option('sysconfdir'), 'wireplumber') wireplumber_config_dir = join_paths(get_option('prefix'), get_option('sysconfdir'), 'wireplumber')
endif endif
cmake = import('cmake') if get_option('wrap_mode') == 'nodownload'
cpptoml = cmake.subproject('cpptoml') cpptoml_dep = dependency('cpptoml')
cpptoml_dep = cpptoml.dependency('cpptoml') else
cmake = import('cmake')
cpptoml = cmake.subproject('cpptoml')
cpptoml_dep = cpptoml.dependency('cpptoml')
endif
gobject_dep = dependency('gobject-2.0', version : '>= 2.58') gobject_dep = dependency('gobject-2.0', version : '>= 2.58')
gmodule_dep = dependency('gmodule-2.0', version : '== ' + gobject_dep.version()) gmodule_dep = dependency('gmodule-2.0', version : '== ' + gobject_dep.version())
......
[wrap-git] [wrap-git]
directory=cpptoml directory=cpptoml
url=https://github.com/skystrife/cpptoml.git url=https://github.com/skystrife/cpptoml.git
revision=master revision=v0.1.1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment