mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 08:28:59 +08:00
[vcpkg] CMAKE_SYSTEM_PROCESSOR is missing if VCPKG_TARGET_ARCHITECTURE is arm or arm64. (#13465)
This change tries to fix issue #13395. Root cause: In script mode, cmake won't populate CMAKE_SYSTEM_PROCESSOR parameter automatically. That parameter is required by libpng to configure build parameters. To fix this issue, we need explicitly set CMAKE_SYSTEM_PROCESSOR value. Verify: On arm64-linux host, run `./vcpkg install tesseract:arm64-linux`.
This commit is contained in:
parent
a150b774a0
commit
27a2418e91
@ -10,6 +10,10 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86 CACHE STRING "")
|
||||
string(APPEND VCPKG_C_FLAGS " -m32")
|
||||
string(APPEND VCPKG_CXX_FLAGS " -m32")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
||||
set(CMAKE_SYSTEM_PROCESSOR armv7l CACHE STRING "")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64 CACHE STRING "")
|
||||
endif()
|
||||
|
||||
get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
|
||||
|
Loading…
Reference in New Issue
Block a user