From e6803b958176c08c3b59498e140c1c753ffea536 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Mon, 26 Aug 2024 21:54:09 +0100 Subject: [PATCH] Use static C++ library by default (#86) --- pymsbuild/_types.py | 1 + pymsbuild/targets/pyd.props | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/pymsbuild/_types.py b/pymsbuild/_types.py index ea9d7d5..8a8ab4c 100644 --- a/pymsbuild/_types.py +++ b/pymsbuild/_types.py @@ -250,6 +250,7 @@ class CProject(_Project): """ options = { "ConfigurationType": "DynamicLibrary", + "DynamicLibcppLinkage": "false", } def __init__(self, name, *members, **options): diff --git a/pymsbuild/targets/pyd.props b/pymsbuild/targets/pyd.props index b77ed41..dafe604 100644 --- a/pymsbuild/targets/pyd.props +++ b/pymsbuild/targets/pyd.props @@ -8,12 +8,16 @@ $(SourceRootDir.TrimEnd($(_Sep)));$(PythonIncludes);%(AdditionalIncludeDirectories) Full Disabled + MultiThreadedDLL + MultiThreaded $(PythonLibs);%(AdditionalLibraryDirectories) True $(TargetPath) $([System.IO.Path]::ChangeExtension('$(TargetPath)', '.pdb')) + ucrt.lib;vcruntime.lib;%(AdditionalDependencies) + libucrt.lib;libvcruntime.lib;%(IgnoreSpecificDefaultLibraries) $(TargetPath)