vcpkg
vcpkg copied to clipboard
[vcpkg scripts] Restore original intention of CMAKE_CROSSCOMPILING
Motivation
When cross compiling, setting CMAKE_CROSSCOMPILING
to empty leads confusion.
- The host dependency will still build
- The port script executes cross-compile behavior since
VCPKG_CROSSCOMPILING
still1
(TRUE
) - The toolchain script executes native-compile behavior with cross-compiler
So, no longer reset CMAKE_CROSSCOMPILING
when cross compiling.
Impact
When the option --host-triplet
is set same with target, CMAKE_CROSSCOMPILING
is TRUE
while VCPKG_CROSSCOMPILING
is FALSE
.
Previous discussion
See https://github.com/microsoft/vcpkg/issues/40474#issuecomment-2293320077
~CMake STREQUAL
is case-sensitive, change ARM64
to arm64
~ ~https://cmake.org/cmake/help/latest/variable/CMAKE_APPLE_SILICON_PROCESSOR.html~