Skip to content

Commit 3b929cb

Browse files
try to fix crypography build in windows debug
Signed-off-by: Cédrik Fuoco <[email protected]>
1 parent 519f8ef commit 3b929cb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmake/dependencies/python3.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,16 @@ IF(RV_TARGET_WINDOWS
375375
AND CMAKE_BUILD_TYPE MATCHES "^Debug$"
376376
)
377377
# OCIO v2.2's pybind11 doesn't find python<ver>.lib in Debug since the name is python<ver>_d.lib.
378+
# Also, Rust libraries (like cryptography via pyo3) look for python3.lib.
378379
ADD_CUSTOM_COMMAND(
379380
TARGET ${_python3_target}
380381
POST_BUILD
381382
COMMENT "Copying Debug Python lib as a unversionned file for Debug"
382383
COMMAND cmake -E copy_if_different ${_python3_implib} ${_python_release_libpath}
383-
COMMAND cmake -E copy_if_different ${_python3_implib} ${_python_release_in_bin_libpath} DEPENDS ${_python3_target} ${_requirements_output_file} ${_requirements_input_file}
384+
COMMAND cmake -E copy_if_different ${_python3_implib} ${_python_release_in_bin_libpath}
385+
COMMAND cmake -E copy_if_different ${_lib_dir}/python${PYTHON_VERSION_MAJOR}_d.lib ${_lib_dir}/python${PYTHON_VERSION_MAJOR}.lib
386+
COMMAND cmake -E copy_if_different ${_bin_dir}/python${PYTHON_VERSION_MAJOR}_d.lib ${_bin_dir}/python${PYTHON_VERSION_MAJOR}.lib
387+
DEPENDS ${_python3_target} ${_requirements_output_file} ${_requirements_input_file}
384388
)
385389
ENDIF()
386390

0 commit comments

Comments
 (0)