summaryrefslogtreecommitdiff
path: root/subprojects
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects')
-rw-r--r--subprojects/boost.wrap7
-rw-r--r--subprojects/gtest.wrap3
-rw-r--r--subprojects/nlohmann.wrap3
-rw-r--r--subprojects/packagefiles/boost/meson.build44
-rw-r--r--subprojects/sdbusplus.wrap3
5 files changed, 60 insertions, 0 deletions
diff --git a/subprojects/boost.wrap b/subprojects/boost.wrap
new file mode 100644
index 0000000..71e0382
--- /dev/null
+++ b/subprojects/boost.wrap
@@ -0,0 +1,7 @@
+[wrap-file]
+source_url = https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.gz
+source_hash = 5347464af5b14ac54bb945dc68f1dd7c56f0dad7262816b956138fc53bcc0131
+source_filename = boost_1_77_0.tar.gz
+
+directory = boost_1_77_0
+patch_directory = boost
diff --git a/subprojects/gtest.wrap b/subprojects/gtest.wrap
new file mode 100644
index 0000000..0d37d2e
--- /dev/null
+++ b/subprojects/gtest.wrap
@@ -0,0 +1,3 @@
+[wrap-git]
+url = https://github.com/google/googletest
+revision = HEAD \ No newline at end of file
diff --git a/subprojects/nlohmann.wrap b/subprojects/nlohmann.wrap
new file mode 100644
index 0000000..a77b7c9
--- /dev/null
+++ b/subprojects/nlohmann.wrap
@@ -0,0 +1,3 @@
+[wrap-git]
+revision = b3e5cb7f20dcc5c806e418df34324eca60d17d4e
+url = https://github.com/nlohmann/json.git
diff --git a/subprojects/packagefiles/boost/meson.build b/subprojects/packagefiles/boost/meson.build
new file mode 100644
index 0000000..f991d36
--- /dev/null
+++ b/subprojects/packagefiles/boost/meson.build
@@ -0,0 +1,44 @@
+project('boost', 'cpp',
+ version: '1.77',
+ meson_version: '>=0.56.0')
+
+cxx = meson.get_compiler('cpp')
+
+# Build if not available
+build_dir = join_paths(meson.current_source_dir(), 'build')
+r = run_command('[','!','-d', build_dir, ']')
+if r.returncode() == 0
+ r = run_command('./bootstrap.sh', '--with-libraries=coroutine,filesystem,iostreams,program_options,regex,system')
+ assert(r.returncode() == 0,
+ 'Bootstrap failed' +
+ '\nstdout: ' + r.stdout().strip() +
+ '\nstderr: ' + r.stderr().strip())
+
+ r = run_command('./b2', 'install','--prefix=build')
+ assert(r.returncode() == 0,
+ 'b2 failed' +
+ '\nstdout: ' + r.stdout().strip() +
+ '\nstderr: ' + r.stderr().strip())
+endif
+
+include_dir = join_paths('build', 'include')
+lib_dir = join_paths(meson.current_source_dir(), 'build', 'lib')
+
+custom_dep = declare_dependency(link_args: ['-L' + lib_dir,
+ '-Wl,-rpath-link,' + lib_dir
+ ])
+
+boost_inc = include_directories(include_dir, is_system:true)
+boost_dep = declare_dependency(
+ include_directories : boost_inc,
+ dependencies : [cxx.find_library('boost_context', dirs: lib_dir, static: true),
+ cxx.find_library('boost_filesystem', dirs: lib_dir, static: true),
+ cxx.find_library('boost_regex', dirs: lib_dir, static: true),
+ cxx.find_library('boost_program_options', dirs: lib_dir, static: true),
+ cxx.find_library('boost_thread', dirs: lib_dir, static: true),
+ cxx.find_library('boost_coroutine', dirs: lib_dir, static: true),
+ cxx.find_library('boost_iostreams', dirs: lib_dir, static: true),
+ custom_dep
+ ])
+
+meson.override_dependency('boost', boost_dep)
diff --git a/subprojects/sdbusplus.wrap b/subprojects/sdbusplus.wrap
new file mode 100644
index 0000000..45ffabb
--- /dev/null
+++ b/subprojects/sdbusplus.wrap
@@ -0,0 +1,3 @@
+[wrap-git]
+url = https://github.com/openbmc/sdbusplus.git
+revision = 95874d930f0bcc8390cd47ab3bb1e5e46db45278