Don't statically link Boost by default #20

Since this would only be needed for distribution, and we're already
doing something similar for libstdc++ on the Ubuntu 18.04 build. This
moves the static linking behind a new build option.
This commit is contained in:
Robbert van der Helm
2020-06-08 15:46:09 +02:00
parent 9ecb65664c
commit 9385360331
4 changed files with 25 additions and 5 deletions
+8 -3
View File
@@ -46,8 +46,13 @@ subdir('src/common/config')
# Statically link against Boost.Filesystem, otherwise it would become impossible
# to distribute a prebuilt version of yabridge
boost_dep = dependency('boost', version : '>=1.66', static : true)
boost_filesystem_dep = dependency('boost', version : '>=1.66', modules : ['filesystem'], static : true)
boost_dep = dependency('boost', version : '>=1.66', static : get_option('with-static-boost'))
boost_filesystem_dep = dependency(
'boost',
version : '>=1.66',
modules : ['filesystem'],
static : get_option('with-static-boost')
)
bitsery_dep = subproject('bitsery').get_variable('bitsery_dep')
threads_dep = dependency('threads')
tomlplusplus_dep = subproject('tomlplusplus').get_variable('tomlplusplus_dep')
@@ -148,7 +153,7 @@ if get_option('use-bitbridge')
winegcc = meson.get_compiler('cpp', native : false)
boost_filesystem_dep = winegcc.find_library(
'boost_filesystem',
static : true,
static : get_option('with-static-boost'),
dirs : [
# Used by Arch based distros
'/usr/local/lib32',