diff --git a/wrapper.py.in b/wrapper.py.in index 9866873..09027dc 100755 --- a/wrapper.py.in +++ b/wrapper.py.in @@ -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: