From 846add6de0b130f69291493ba1cf187f0e68d550 Mon Sep 17 00:00:00 2001 From: Lasse Lauwerys Date: Sat, 14 Feb 2026 16:50:04 +0100 Subject: [PATCH] Allow for generator override using environment var on Windows --- pcre_ext/pcre2-10.46 | 1 + setup_utils.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 160000 pcre_ext/pcre2-10.46 diff --git a/pcre_ext/pcre2-10.46 b/pcre_ext/pcre2-10.46 new file mode 160000 index 0000000..b2bd425 --- /dev/null +++ b/pcre_ext/pcre2-10.46 @@ -0,0 +1 @@ +Subproject commit b2bd4254b379b9d7dc9a3dda060a7e27009ccdff diff --git a/setup_utils.py b/setup_utils.py index 8d2e6bc..7e13aff 100644 --- a/setup_utils.py +++ b/setup_utils.py @@ -568,8 +568,9 @@ def _has_built_library() -> bool: ] # On Windows, force MSVC and the /MD runtime. Never let CMake pick MinGW. if _is_windows_platform(): + vs_gen = os.environ.get("CMAKE_GENERATOR", "Visual Studio 18 2022") cmake_args += [ - "-G", "Visual Studio 17 2022", + "-G", vs_gen, "-A", "x64", "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL", ]