parent
f96e42fe04
commit
1d051d0e6e
|
@ -28,7 +28,7 @@ if(WIN32)
|
|||
HINTS "/Windows/System32/WindowsPowerShell/v1.0"
|
||||
REQUIRED)
|
||||
else()
|
||||
find_program(POWERSHELL pwsh REQUIRED)
|
||||
find_program(POWERSHELL pwsh)
|
||||
endif()
|
||||
|
||||
include(Set-Toolchain-vcpkg)
|
||||
|
|
|
@ -184,8 +184,10 @@ Ignore the following cmake error.
|
|||
endwhile()
|
||||
|
||||
# Convert to UNIX line endings on Windows, just copy the file otherwise.
|
||||
|
||||
if(CMAKE_HOST_SYSTEM MATCHES Windows OR ((NOT DEFINED CMAKE_HOST_SYSTEM) AND WIN32))
|
||||
if(NOT DEFINED POWERSHELL)
|
||||
message(FATAL_ERROR "Powershell is required to convert line endings on Windows.")
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND ${POWERSHELL} -NoLogo -NoProfile -ExecutionPolicy Bypass -Command [=[
|
||||
$text = [IO.File]::ReadAllText("CHANGELOG.md.work") -replace "`r`n", "`n"
|
||||
|
|
|
@ -320,6 +320,9 @@ function(vcpkg_remove_optional_deps vcpkg_exe)
|
|||
endfunction()
|
||||
|
||||
function(vcpkg_set_toolchain)
|
||||
if(NOT DEFINED POWERSHELL)
|
||||
message(FATAL_ERROR "Powershell is required to use vcpkg binaries.")
|
||||
endif()
|
||||
if(NOT DEFINED ENV{VCPKG_ROOT})
|
||||
get_filename_component(preferred_root ${CMAKE_SOURCE_DIR}/../vcpkg ABSOLUTE)
|
||||
|
||||
|
|
|
@ -75,8 +75,10 @@ Ignore the following cmake error.
|
|||
endwhile()
|
||||
|
||||
# Convert to UNIX line endings on Windows, just copy the file otherwise.
|
||||
|
||||
if(CMAKE_HOST_SYSTEM MATCHES Windows OR ((NOT DEFINED CMAKE_HOST_SYSTEM) AND WIN32))
|
||||
if(NOT DEFINED POWERSHELL)
|
||||
message(FATAL_ERROR "Powershell is required to convert line endings on Windows.")
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND ${POWERSHELL} -NoLogo -NoProfile -ExecutionPolicy Bypass -Command [=[
|
||||
$text = [IO.File]::ReadAllText("appcast.xml.work") -replace "`r`n", "`n"
|
||||
|
|
|
@ -158,6 +158,9 @@ if(WIN32 AND CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg")
|
|||
set(ENV{PATH} "${dbg_prefix}/bin;${common_prefix}/bin;$ENV{PATH}")
|
||||
|
||||
if(NOT ZIP_PROGRAM AND NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/zip.exe)
|
||||
if(NOT DEFINED POWERSHELL)
|
||||
message(FATAL_ERROR "Powershell is required for extraction.")
|
||||
endif()
|
||||
# get zip binary for wxrc
|
||||
file(DOWNLOAD "https://www.willus.com/archive/zip64/infozip_binaries_win32.zip" ${CMAKE_CURRENT_BINARY_DIR}/infozip_binaries_win32.zip)
|
||||
# unzip it
|
||||
|
|
Loading…
Reference in New Issue