Make boost/nghttp2 cmake build static libraries
When running compiling from local dependencies, it's nice to be able to
move binaries around wherever they're needed.
When we moved to the cmake version of boost, we started building shared
libraries on accident. nghttp2 has always pulled shared libraries since
introduction.
Go back to building static libraries.
Tested: Binary build from desktop launches directly without a
"missing boost_url.so" error.
Change-Id: I9858f27f21841097bd03a6bbcac953b08caa4b14
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/meson.build b/meson.build
index 44ee65d..04906fa 100644
--- a/meson.build
+++ b/meson.build
@@ -282,7 +282,7 @@
'ENABLE_STATIC_LIB': true
})
nghttp2_ex = cmake.subproject('nghttp2', options: opt_var)
- nghttp2 = nghttp2_ex.dependency('nghttp2')
+ nghttp2 = nghttp2_ex.dependency('nghttp2_static')
endif
bmcweb_dependencies += nghttp2
@@ -328,8 +328,10 @@
cmake = import('cmake')
opt = cmake.subproject_options()
opt.add_cmake_defines({
- 'BOOST_INCLUDE_LIBRARIES': 'asio;beast;callable_traits;headers;process;type_index;url;uuid'
+ 'BOOST_INCLUDE_LIBRARIES': 'asio;beast;callable_traits;headers;process;type_index;url;uuid',
+ 'BUILD_SHARED_LIBS': 'OFF',
})
+
boost = cmake.subproject('boost', required: true, options: opt)
boost_asio = boost.dependency('boost_asio').as_system()
boost_beast = boost.dependency('boost_beast').as_system()