From bfc7e5a449550c5a0ab66e1e1da51d2939e21c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Garramu=C3=B1o?= Date: Tue, 13 Feb 2024 23:25:50 -0300 Subject: [PATCH] Windows fix I hope. --- cmake/Modules/BuildPython.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/Modules/BuildPython.cmake b/cmake/Modules/BuildPython.cmake index 8de204857..6cd9168a8 100644 --- a/cmake/Modules/BuildPython.cmake +++ b/cmake/Modules/BuildPython.cmake @@ -52,11 +52,13 @@ else() set( platform Win32 ) endif() - set( Python_ENV ${CMAKE_COMMAND} -E env "PATH=${Python_PATH}" -- ) + # @bug: This creates another .bat file and makes the original .bat file fail + # set( Python_ENV ${CMAKE_COMMAND} -E env "PATH=${Python_PATH}" -- ) + string(CONCAT Python_ENV "cmd /c \"set PATH=\"${Python_PATH}\"") + string(CONCAT Python_BUILD ${Python_ENV} && PCbuild/build.bat -e -q -p ${platform} ) - set( Python_CONFIGURE ) - set( Python_BUILD ${Python_ENV} PCbuild/build.bat -e -q -p ${platform} ) - set( Python_INSTALL ${Python_ENV} python.bat PC/layout --precompile --preset-default --copy "${CMAKE_INSTALL_PREFIX}/bin/" ) + + set( Python_INSTALL ${Python_ENV} && python.bat PC/layout --precompile --preset-default --copy "${CMAKE_INSTALL_PREFIX}/bin/" ) endif() ExternalProject_Add(