18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-22 04:24:59 +01:00

Copy the Python runtime next to the executable only when the Python install has changed

This commit is contained in:
2026-10-16 23:37:27 +02:00
parent 6ee628aaa5
commit 0662df23a7
2 changed files with 42 additions and 2 deletions

View File

@@ -647,8 +647,9 @@ if(WIN32 AND WITH_PYTHON)
TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${EU07_PY_DLL}" "$<TARGET_FILE_DIR:${PROJECT_NAME}>"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${EU07_PY_ZLIB}" "$<TARGET_FILE_DIR:${PROJECT_NAME}>"
COMMAND ${CMAKE_COMMAND} -E copy_directory "${EU07_PY_LIBDIR}" "$<TARGET_FILE_DIR:${PROJECT_NAME}>/python64/Lib"
COMMAND ${CMAKE_COMMAND} -E copy_directory "${EU07_PY_DLLSDIR}" "$<TARGET_FILE_DIR:${PROJECT_NAME}>/python64/DLLs"
# Lib with its site-packages is huge, the script copies it only when the Python install has changed
COMMAND ${CMAKE_COMMAND} "-DPY_LIBDIR=${EU07_PY_LIBDIR}" "-DPY_DLLSDIR=${EU07_PY_DLLSDIR}" "-DDEST_DIR=$<TARGET_FILE_DIR:${PROJECT_NAME}>"
-P "${CMAKE_CURRENT_SOURCE_DIR}/CMake_modules/CopyPythonRuntime.cmake"
)
endif()