From 90114a0e2ecfc983d496720debbfec3a4c4d84ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Fri, 14 Feb 2020 11:03:58 +0800 Subject: [PATCH] [proj4] Fix the feature database judgment (#8763) * [proj4]Fix the feature database judgment. * [proj4]Re-fix sqlite tool judgment. --- ports/proj4/portfile.cmake | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake index 05ef8f8e3e..7ead087206 100644 --- a/ports/proj4/portfile.cmake +++ b/ports/proj4/portfile.cmake @@ -22,22 +22,19 @@ endif() vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS database BUILD_PROJ_DATABASE ) - if ("database" IN_LIST FEATURES) if (VCPKG_TARGET_IS_WINDOWS) set(BIN_SUFFIX .exe) - if (VCPKG_TARGET_ARCHITECTURE STREQUAL arm) - if (NOT EXISTS ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/sqlite3.exe) - message(FATAL_ERROR "Proj4 database need to install sqlite3[tool]:x86-windows first.") - endif() + if (EXISTS ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/sqlite3.exe) set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/../x86-windows/tools) - elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 OR (VCPKG_TARGET_ARCHITECTURE STREQUAL x64 AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) - if (NOT EXISTS ${CURRENT_INSTALLED_DIR}/../x64-windows/tools/sqlite3.exe) - message(FATAL_ERROR "Proj4 database need to install sqlite3[tool]:x64-windows first.") - endif() + elseif (EXISTS ${CURRENT_INSTALLED_DIR}/../x86-windows-static/tools/sqlite3.exe) + set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/../x86-windows-static/tools) + elseif (EXISTS ${CURRENT_INSTALLED_DIR}/../x64-windows/tools/sqlite3.exe AND (NOT CMAKE_HOST_SYSTEM_PROCESSOR OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")) set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/../x64-windows/tools) + elseif (EXISTS ${CURRENT_INSTALLED_DIR}/../x64-windows-static/tools/sqlite3.exe AND (NOT CMAKE_HOST_SYSTEM_PROCESSOR OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")) + set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/../x64-windows-static/tools) else() - set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/tools) + message(FATAL_ERROR "Proj4 database need to install sqlite3[tool]:x86-windows first.") endif() else() set(BIN_SUFFIX)