From 9e0c2f6867d34a35e009d9a0caee256a4528edc5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 9 Sep 2022 11:32:42 +1000 Subject: CMake: exclude Python libs & batch scripts WITH_PYTHON_MODULE for WIN32 --- source/creator/CMakeLists.txt | 55 +++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 25 deletions(-) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 2aa534d55eb..23cb38362c2 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -849,22 +849,24 @@ elseif(WIN32) if(WITH_PYTHON) string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION}) - if(NOT CMAKE_COMPILER_IS_GNUCC) - install( - FILES - ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/bin/python${_PYTHON_VERSION_NO_DOTS}.dll - ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/bin/python3.dll - DESTINATION ${TARGETDIR_LIB} - CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel - ) + if(NOT WITH_PYTHON_MODULE) + if(NOT CMAKE_COMPILER_IS_GNUCC) + install( + FILES + ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/bin/python${_PYTHON_VERSION_NO_DOTS}.dll + ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/bin/python3.dll + DESTINATION ${TARGETDIR_LIB} + CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel + ) - install( - FILES - ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/bin/python${_PYTHON_VERSION_NO_DOTS}_d.dll - ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/bin/python3_d.dll - DESTINATION ${TARGETDIR_LIB} - CONFIGURATIONS Debug - ) + install( + FILES + ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/bin/python${_PYTHON_VERSION_NO_DOTS}_d.dll + ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/bin/python3_d.dll + DESTINATION ${TARGETDIR_LIB} + CONFIGURATIONS Debug + ) + endif() endif() if(WITH_PYTHON_INSTALL) @@ -1035,16 +1037,19 @@ elseif(WIN32) ) endif() - install( - FILES - ${CMAKE_SOURCE_DIR}/release/windows/batch/blender_debug_gpu.cmd - ${CMAKE_SOURCE_DIR}/release/windows/batch/blender_debug_gpu_glitchworkaround.cmd - ${CMAKE_SOURCE_DIR}/release/windows/batch/blender_debug_log.cmd - ${CMAKE_SOURCE_DIR}/release/windows/batch/blender_factory_startup.cmd - ${CMAKE_SOURCE_DIR}/release/windows/batch/blender_oculus.cmd - ${CMAKE_SOURCE_DIR}/release/windows/batch/oculus.json - DESTINATION ${TARGETDIR_LIB} - ) + + if(NOT WITH_PYTHON_MODULE) + install( + FILES + ${CMAKE_SOURCE_DIR}/release/windows/batch/blender_debug_gpu.cmd + ${CMAKE_SOURCE_DIR}/release/windows/batch/blender_debug_gpu_glitchworkaround.cmd + ${CMAKE_SOURCE_DIR}/release/windows/batch/blender_debug_log.cmd + ${CMAKE_SOURCE_DIR}/release/windows/batch/blender_factory_startup.cmd + ${CMAKE_SOURCE_DIR}/release/windows/batch/blender_oculus.cmd + ${CMAKE_SOURCE_DIR}/release/windows/batch/oculus.json + DESTINATION ${TARGETDIR_LIB} + ) + endif() if(WITH_BLENDER_THUMBNAILER) install( -- cgit v1.2.3