Cannot detect libraries outside of "system" prefix
Hey,
This is a followup to !74 (comment 1662214) in where I was asked to remove the extra directories in the library lookup.
Unfortunately, this makes it impossible to detect libtheora under MSVC, because Meson does not pass linker options correctly:
Running compile:
Working directory: E:\krita-win\msvc\b_deps\ext_ffmpeg\ext_ffmpeg-prefix\src\ext_ffmpeg-build\meson-private\tmp0pjhhm6m
Command line: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe /LIBPATH:E:/krita-win/msvc/i//lib -IE:/krita-win/msvc/i//include E:\krita-win\msvc\b_deps\ext_ffmpeg\ext_ffmpeg-prefix\src\ext_ffmpeg-build\meson-private\tmp0pjhhm6m\testfile.c /FeE:\krita-win\msvc\b_deps\ext_ffmpeg\ext_ffmpeg-prefix\src\ext_ffmpeg-build\meson-private\tmp0pjhhm6m\output.exe /nologo /showIncludes /utf-8 /MD -guard:cf /nologo /showIncludes /utf-8 /Od /Oi- theoraenc.lib /link /nologo /release /nologo -GUARD:CF
Code:
int main(void) { return 0; }
Compiler stdout:
testfile.c
LINK : fatal error LNK1181: no se puede abrir el archivo de entrada 'theoraenc.lib'
Compiler stderr:
cl : L¡nea de comandos warning D9002 : se omite la opci¢n desconocida '/LIBPATH:E:/krita-win/msvc/i//lib'
..\ext_ffmpeg\meson.build:1646:10: ERROR: C shared or static library 'theoraenc' not found
[constants]
common_args = ['-IE:/krita-win/msvc/i//include']
common_link_args = ['-LE:/krita-win/msvc/i//lib']
[binaries]
c = 'C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe'
cpp = 'C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe'
ar = 'C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/lib.exe'
strip = ''
pkgconfig = 'E:/krita-win/msvc/i/bin/pkgconf.exe'
[properties]
c_args = common_args + ['-guard:cf']
cpp_args = common_args + ['-guard:cf']
c_link_args = common_link_args + ['-GUARD:CF']
cpp_link_args = common_link_args + ['-GUARD:CF']
[built-in options]
pkg_config_path = 'E:/krita-win/msvc/i//share/pkgconfig,E:/krita-win/msvc/i//lib/pkgconfig'
This is probably a Meson-specific issue, but you may want to consider adding the workaround for the installation prefix until it's handled upstream.