microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.26k stars 6.41k forks source link

Could not find PowerShell Core (Linux -> Windows cross compile) #16236

Closed autoantwort closed 3 years ago

autoantwort commented 3 years ago

Describe the bug I got the message:

CMake Error at scripts/cmake/vcpkg_copy_tool_dependencies.cmake:26 (message):
  Could not find PowerShell Core; please open an issue to report this.

Environment

To Reproduce Steps to reproduce the behavior:

  1. Use the mxe environment
  2. ./vcpkg install aubio --triplet=x64-linux-windows-static
  3. See error

Expected behavior Do error

Failure logs See here for additional logs (on the right you can browse through all files).

cat x64-linux-windows-static.cmake

# from https://stackoverflow.com/questions/58777810/how-to-integrate-vcpkg-in-linux-with-cross-build-toolchain-as-well-as-sysroot

set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME MinGW)

set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE /usr/src/mxe/usr/x86_64-w64-mingw32.shared.posix/share/cmake/mxe-conf.cmake)

Additional context Used vcpkg + #16051

longnguyen2004 commented 3 years ago

Can you try installing pwsh on your Docker container before running vcpkg? (see this link for more info)

autoantwort commented 3 years ago

That worked 👍

longnguyen2004 commented 3 years ago

Probably needs some documentation update then. Do you know who to cc?

autoantwort commented 3 years ago

I have created a PR

longnguyen2004 commented 3 years ago

Thanks for the PR! It's nice seeing others help to maintain the mingw ports, seeing sfhacker everywhere is frustrating...

JackBoosY commented 3 years ago

@longnguyen2004 Just ignore him.

kxgy commented 2 years ago

cmake -DMINGW:BOOL="TRUE" ...

WentsingNee commented 3 weeks ago

cmake -DMINGW:BOOL="TRUE" ...

It works for me! Thank U