From 1293c632898fa5398f293e00845317bc9abd0432 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 1 Apr 2016 16:48:16 -0700 Subject: [PATCH] Deploy powershell.exe as content for ConsoleHost CMake will now output the artifacts of the native build into the ConsoleHost project, where .NET CLI picks it up as content and deploys it automatically. --- PowerShellGitHubDev.psm1 | 1 - src/Microsoft.PowerShell.ConsoleHost/project.json | 4 ++++ src/powershell-native/CMakeLists.txt | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/PowerShellGitHubDev.psm1 b/PowerShellGitHubDev.psm1 index e14cf531ae..94c009c5cc 100644 --- a/PowerShellGitHubDev.psm1 +++ b/PowerShellGitHubDev.psm1 @@ -176,7 +176,6 @@ function Start-PSBuild { cmake ..\src\powershell-native } msbuild powershell.vcxproj /p:Configuration=$msbuildConfiguration - # cp -rec $msbuildConfiguration\* $Output } finally { Pop-Location } diff --git a/src/Microsoft.PowerShell.ConsoleHost/project.json b/src/Microsoft.PowerShell.ConsoleHost/project.json index 0b99854b1d..1a22616bb8 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/project.json +++ b/src/Microsoft.PowerShell.ConsoleHost/project.json @@ -14,6 +14,10 @@ "Microsoft.PowerShell.Commands.Utility": "1.0.0-*" }, + "content": [ + "powershell.exe" + ], + "frameworks": { "net451": { } diff --git a/src/powershell-native/CMakeLists.txt b/src/powershell-native/CMakeLists.txt index 183988d69f..738bcd0330 100644 --- a/src/powershell-native/CMakeLists.txt +++ b/src/powershell-native/CMakeLists.txt @@ -3,6 +3,9 @@ project(PowerShell) add_compile_options() +# set the output path for `powershell.exe` +set(EXECUTABLE_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/../Microsoft.PowerShell.ConsoleHost") + # set these flags, so build does static linking for msvcr120.dll # otherwise this dll need to be present on the system set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")