Fix meson warnings
As written, when we pull in the boost and boost-url subprojects, we hit
problems in the meson files.
```
../meson.build:291: WARNING: include_directories sandbox violation!
```
This commit resolves this issue, by adding explicit meson.build files
for both boost and boost-url.
Tested:
meson buildlocal
No longer returns the above error, and shows
Subprojects
boost : YES
boost-url : YES
Whereas previously those two dependencies showed up as NO.
Code compiles.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ib25340723c8cb7d6139e3e51db023e9d90e30aab
diff --git a/.gitignore b/.gitignore
index eb1140e..588f0fc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -201,6 +201,7 @@
# subproject directories
/subprojects/*
!/subprojects/*.wrap
+!/subprojects/packagefiles
# Meson Directories
meson-logs
diff --git a/meson.build b/meson.build
index 8c86fa9..12e51a3 100644
--- a/meson.build
+++ b/meson.build
@@ -287,20 +287,14 @@
boost = dependency('boost',version : '>=1.79.0', required : false, include_type: 'system')
if not boost.found()
- subproject('boost', required: false)
- boost_inc = include_directories('subprojects/boost_1_80_0/', is_system:true)
- boost = declare_dependency(include_directories : boost_inc)
- boost = boost.as_system('system')
+ boost = subproject('boost', required: true).get_variable('boost_dep')
endif
bmcweb_dependencies += boost
if cxx.has_header('boost/url/url_view.hpp')
boost_url = declare_dependency()
else
- subproject('boost-url', required: false)
- boost_url_inc = include_directories('subprojects/boost-url/include', is_system:true)
- boost_url= declare_dependency(include_directories : boost_url_inc)
- boost_url = boost_url.as_system('system')
+ boost_url = subproject('boost-url', required: true).get_variable('boost_url_dep')
endif
bmcweb_dependencies += boost_url
diff --git a/subprojects/boost-url.wrap b/subprojects/boost-url.wrap
index 1e30bc7..d19baba 100644
--- a/subprojects/boost-url.wrap
+++ b/subprojects/boost-url.wrap
@@ -1,3 +1,6 @@
[wrap-git]
+directory = boost-url-git
+
revision = d740a92d38e3a8f4d5b2153f53b82f1c98e312ab
url = https://github.com/CPPAlliance/url.git
+patch_directory = boost-url
diff --git a/subprojects/boost.wrap b/subprojects/boost.wrap
index 1c2051a..75735f4 100644
--- a/subprojects/boost.wrap
+++ b/subprojects/boost.wrap
@@ -1,4 +1,11 @@
[wrap-file]
+directory = boost_1_80_0
+
source_url = https://downloads.yoctoproject.org/mirror/sources/boost_1_80_0.tar.bz2
source_hash = 1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0
source_filename = 1_80_0.tar.bz2
+
+patch_directory = boost
+
+[provide]
+boost = boost_dep
diff --git a/subprojects/packagefiles/boost-url/meson.build b/subprojects/packagefiles/boost-url/meson.build
new file mode 100644
index 0000000..7e64115
--- /dev/null
+++ b/subprojects/packagefiles/boost-url/meson.build
@@ -0,0 +1,9 @@
+project('boost-url',
+ 'cpp',
+ version : '0.1',
+ license : 'Boost'
+)
+
+boost_url_dep = declare_dependency(
+ include_directories : include_directories('include'),
+)
diff --git a/subprojects/packagefiles/boost/meson.build b/subprojects/packagefiles/boost/meson.build
new file mode 100644
index 0000000..9a9c2c5
--- /dev/null
+++ b/subprojects/packagefiles/boost/meson.build
@@ -0,0 +1,9 @@
+project('boost',
+ 'cpp',
+ version : '1.80.0',
+ license : 'Boost'
+)
+
+boost_dep = declare_dependency(
+ include_directories : include_directories('.'),
+)