Add proper macro defs for 32-bit Boost Filesystem

This commit is contained in:
Robbert van der Helm
2021-06-24 18:33:00 +02:00
parent b737ba01ad
commit 741b2b7fb5
+14 -3
View File
@@ -153,9 +153,15 @@ boost_dep = dependency('boost', version : '>=1.66', static : with_static_boost)
# use case anyways we'll just brute force it for the time being. # use case anyways we'll just brute force it for the time being.
if get_option('build.cpp_args').contains('-m32') if get_option('build.cpp_args').contains('-m32')
if with_static_boost if with_static_boost
boost_filesystem_dep = declare_dependency(link_args : '-staticboost_filesystem') boost_filesystem_dep = declare_dependency(
link_args : '-staticboost_filesystem',
compile_args : '-DBOOST_FILESYSTEM_STATIC_LINK=1',
)
else else
boost_filesystem_dep = declare_dependency(link_args : '-lboost_filesystem') boost_filesystem_dep = declare_dependency(
link_args : '-lboost_filesystem',
compile_args : '-DBOOST_FILESYSTEM_DYN_LINK=1',
)
endif endif
else else
boost_filesystem_dep = dependency( boost_filesystem_dep = dependency(
@@ -605,7 +611,8 @@ if with_bitbridge
# search path set by the system in `find_library()`. If anyone does know how # search path set by the system in `find_library()`. If anyone does know how
# to properly do this, please let me know! # to properly do this, please let me know!
winegcc = meson.get_compiler('cpp', native : false) winegcc = meson.get_compiler('cpp', native : false)
boost_filesystem_32bit_dep = winegcc.find_library( boost_filesystem_32bit_dep = declare_dependency(
dependencies : winegcc.find_library(
'boost_filesystem', 'boost_filesystem',
static : with_static_boost, static : with_static_boost,
dirs : [ dirs : [
@@ -621,6 +628,10 @@ if with_bitbridge
'/usr/local/lib', '/usr/local/lib',
'/usr/lib', '/usr/lib',
] ]
),
compile_args : with_static_boost
? '-DBOOST_FILESYSTEM_STATIC_LINK=1'
: '-DBOOST_FILESYSTEM_DYN_LINK=1',
) )
xcb_32bit_dep = winegcc.find_library('xcb') xcb_32bit_dep = winegcc.find_library('xcb')