From 89d112b839a61f81fb5f341c908d6412e3855228 Mon Sep 17 00:00:00 2001 From: David Hahn Date: Mon, 27 Apr 2020 14:47:36 -0700 Subject: [boost-modular-build] Fix lack of arm64-linux support (#10814) * Fix boost modular build for ARM64 builds on Linux * Add error message * Fix endif error * Fix typo in error msg * Bump up version --- ports/boost-modular-build-helper/boost-modular-build.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ports/boost-modular-build-helper/boost-modular-build.cmake b/ports/boost-modular-build-helper/boost-modular-build.cmake index f254cb5a3..765d882b8 100644 --- a/ports/boost-modular-build-helper/boost-modular-build.cmake +++ b/ports/boost-modular-build-helper/boost-modular-build.cmake @@ -6,7 +6,9 @@ function(boost_modular_build) endif() # Todo: this serves too similar a purpose as vcpkg_find_acquire_program() - if(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x64-linux/tools/boost-build") + elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE) elseif(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE) @@ -15,7 +17,11 @@ function(boost_modular_build) endif() if(NOT EXISTS "${BOOST_BUILD_PATH}") - message(FATAL_ERROR "The x86 boost-build tools must be installed to build for non-x86/x64 platforms. Please run `vcpkg install boost-build:x86-windows`.") + if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + message(FATAL_ERROR "The x64 boost-build tools must be installed to build arm64 for Linux. Please run `vcpkg install boost-build:x64-linux`.") + else() + message(FATAL_ERROR "The x86 boost-build tools must be installed to build for non-x86/x64 platforms. Please run `vcpkg install boost-build:x86-windows`.") + endif() endif() if(EXISTS "${BOOST_BUILD_PATH}/b2.exe") -- cgit v1.2.3