Fix powershell-native output directory

Thanks Stack Overflow https://stackoverflow.com/a/7750816
This commit is contained in:
Andrew Schwartzmeyer
2016-04-01 23:10:33 -07:00
parent 1b3bd12230
commit 4a7a521077
+5 -1
View File
@@ -4,7 +4,11 @@ project(PowerShell)
add_compile_options()
# set the output path for `powershell.exe`
set(EXECUTABLE_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/../Microsoft.PowerShell.ConsoleHost")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/../Microsoft.PowerShell.ConsoleHost")
foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
# set these flags, so build does static linking for msvcr120.dll
# otherwise this dll need to be present on the system