Skip to content

Commit 9d8530b

Browse files
committed
Normalize WINDIR path for bundled DLLs in CMake
Replaces backslashes with forward slashes in the WINDIR environment variable and updates DLL paths to use the normalized variable. This ensures consistent path formatting for bundled system libraries.
1 parent d9c9e18 commit 9d8530b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/serious_python_windows/windows/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,13 @@ target_link_libraries(${PLUGIN_NAME} PRIVATE
6969
# List of absolute paths to libraries that should be bundled with the plugin.
7070
# This list could contain prebuilt libraries, or libraries created by an
7171
# external build triggered from this build file.
72+
string(REPLACE "\\" "/" SERIOUS_PYTHON_WINDIR "$ENV{WINDIR}")
7273
set(serious_python_windows_bundled_libraries
7374
"${PYTHON_PACKAGE}/python312$<$<CONFIG:Debug>:_d>.dll"
7475
"${PYTHON_PACKAGE}/python3$<$<CONFIG:Debug>:_d>.dll"
75-
"$ENV{WINDIR}/system32/msvcp140.dll"
76-
"$ENV{WINDIR}/system32/vcruntime140.dll"
77-
"$ENV{WINDIR}/system32/vcruntime140_1.dll"
76+
"${SERIOUS_PYTHON_WINDIR}/System32/msvcp140.dll"
77+
"${SERIOUS_PYTHON_WINDIR}/System32/vcruntime140.dll"
78+
"${SERIOUS_PYTHON_WINDIR}/System32/vcruntime140_1.dll"
7879
PARENT_SCOPE
7980
)
8081

0 commit comments

Comments
 (0)