wrapper: add the ld search dir to WINEPATH

This commit is contained in:
Danny Robson 2019-09-24 08:41:04 +10:00
parent 7233effbba
commit 2d44eae66e

View File

@ -111,7 +111,16 @@ def break_path_for_msys2(path):
# to ever deal with...
if is_really_windows():
separator = ';'
depsdir = ['bin', 'lib']
depsdir = [
f"@CMAKE_CURRENT_BINARY_DIR@/deps/{dir}"
for dir in ['bin', 'lib']
]
# Add the likely path to runtime dependencies for Linux/mingw.
#
# We want to promote this over the practice of copying DLLs into the
# `.wine/windows/system32/` directory because it reduces the chances of
# stale DLLs when we upgrade the compiler.
depsdir.append("/usr/lib/gcc/x86_64-w64-mingw32/@CMAKE_CXX_COMPILER_VERSION@/")
searchvar = 'WINEPATH'
env['WINEDEBUG'] = '-all'
else:
@ -122,7 +131,7 @@ else:
# append the in-tree dependencies to the library path
search = separator.join(
break_path_for_msys2("@CMAKE_CURRENT_BINARY_DIR@/deps/") + i for i in depsdir
break_path_for_msys2(i) for i in depsdir
)
if searchvar in env: