From 2f033fe5c922cc7d1ca1b619dc665cbc21341983 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 11:35:16 +0000 Subject: build: package and invoke install.cmd instead of install.ps1 The Windows ZIP now ships install.cmd, rewritten to CRLF by configure_file so the package is right on any build host. The CMake install target runs it through "cmd /d /c call", and install.cmd replaces install.ps1 in the version input paths. Co-Authored-By: Claude Opus 5.5 --- cmake/Install.cmake.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'cmake/Install.cmake.in') diff --git a/cmake/Install.cmake.in b/cmake/Install.cmake.in index c6cd83f..7ee27a5 100644 --- a/cmake/Install.cmake.in +++ b/cmake/Install.cmake.in @@ -11,12 +11,13 @@ endif() set(cpsc_install_windows "@WIN32@") if(cpsc_install_windows) - cpsc_find_dependency(PROGRAM cpsc_powershell NAMES powershell.exe REQUIRED) + cpsc_find_dependency(PROGRAM cpsc_cmd NAMES cmd.exe REQUIRED) + file(TO_NATIVE_PATH "@CMAKE_CURRENT_SOURCE_DIR@/install.cmd" cpsc_installer) + # An explicit "call" keeps cmd's handling of the quoted script path the same on CMake 3.x and 4.x. execute_process( - COMMAND "${cpsc_powershell}" -NoProfile -NonInteractive -ExecutionPolicy Bypass - -File "@CMAKE_CURRENT_SOURCE_DIR@/install.ps1" - -SourceDir "@CMAKE_CURRENT_BINARY_DIR@" - -Prefix "${CMAKE_INSTALL_PREFIX}" + COMMAND "${cpsc_cmd}" /d /c call "${cpsc_installer}" + --source-dir "@CMAKE_CURRENT_BINARY_DIR@" + --prefix "${CMAKE_INSTALL_PREFIX}" RESULT_VARIABLE cpsc_install_result ) else() -- cgit v1.3.1-4-g156e