fix(protocan): держи import library в build-каталоге

This commit is contained in:
2026-08-31 20:58:52 +03:00
parent 92fc2ade58
commit e6bea52db0

View File

@@ -48,10 +48,11 @@ def _build_msvc(output: Path, build_dir: Path) -> None:
if vcvars is None:
raise SystemExit("Visual Studio C++ tools were not found")
quoted_sources = " ".join(f'"{source}"' for source in SOURCES)
import_library = build_dir / "setcore.lib"
command = (
f'call "{vcvars}" && cl /nologo /W4 /std:c11 '
f'/DPCAN_ABI_BUILD_DLL /I"{INCLUDE}" /LD {quoted_sources} '
f'/Fe"{output}"'
f'/Fe"{output}" /link /IMPLIB:"{import_library}"'
)
# shell=True is intentional on Windows: ``call`` must run the batch file
# in the same cmd.exe process that subsequently launches cl.exe.