From 5d9f3ad860442d3401b7dfcb20bd169d1907a3c2 Mon Sep 17 00:00:00 2001 From: Sergei Vorobev Date: Fri, 17 Jun 2016 15:40:07 -0700 Subject: [PATCH] Update powershell-native\CMakeLists.txt with a fixed name of the library --- src/powershell-native/CMakeLists.txt | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/powershell-native/CMakeLists.txt b/src/powershell-native/CMakeLists.txt index c0cd33d8e..a4ac5cdfa 100644 --- a/src/powershell-native/CMakeLists.txt +++ b/src/powershell-native/CMakeLists.txt @@ -22,9 +22,6 @@ include_directories( link_directories( nativemsh/pwrshcommon) -add_definitions(-DUNICODE) -add_definitions(-D_UNICODE) - add_executable(powershell WIN32 nativemsh/pwrshcommon/pwrshcommon.cpp nativemsh/pwrshcommon/WinSystemCallFacade.cpp @@ -34,15 +31,26 @@ add_library(pwrshplugin nativemsh/pwrshplugin/entrypoints.cpp nativemsh/pwrshplugin/pwrshclrhost.cpp nativemsh/pwrshplugin/pwrshpluginerrorcodes.mc - nativemsh/pwrshplugin/pwrshpluginerrorcodes.rc) + nativemsh/pwrshplugin/pwrshpluginerrorcodes.rc + nativemsh/pwrshplugin/pwrshplugin.def) -# This subsystem definition is using old policy. TODO: figure out for release and the rest -set_target_properties(powershell PROPERTIES COMPILE_DEFINITIONS "_CONSOLE") + +SET(powershell_definitions + _CONSOLE + UNICODE + _UNICODE) + +set_target_properties(powershell PROPERTIES COMPILE_DEFINITIONS "${powershell_definitions}") set_target_properties(powershell PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE") set_target_properties(powershell PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE") set_target_properties(powershell PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:CONSOLE") set_target_properties(powershell PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:CONSOLE") +SET(pwrshplugin_definitions + UNICODE + _UNICODE) + +set_target_properties(pwrshplugin PROPERTIES COMPILE_DEFINITIONS "${pwrshplugin_definitions}") target_link_libraries(powershell mscoree.lib @@ -51,10 +59,5 @@ target_link_libraries(powershell msxml6.lib legacy_stdio_definitions.lib) -target_link_libraries(pwrshmsg - mscoree.lib - MUILoad.lib - kernel32.lib - msxml6.lib - legacy_stdio_definitions.lib) +target_link_libraries(pwrshplugin)