diff options
| author | Phil Christensen <philc@microsoft.com> | 2018-12-21 00:36:36 -0800 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2018-12-21 00:36:36 -0800 |
| commit | 09c3cc0d88562083949357e1499130e68c5706c5 (patch) | |
| tree | c848583011035ab21b43f523b23533055a017723 /scripts | |
| parent | 0d1229d34babdc9c8fbfe2e1b43b38e657519093 (diff) | |
| parent | 4afe20fc123d794cd066d1dc19b8873b3a2a3645 (diff) | |
| download | vcpkg-09c3cc0d88562083949357e1499130e68c5706c5.tar.gz vcpkg-09c3cc0d88562083949357e1499130e68c5706c5.zip | |
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/philc/4990
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/cmake/vcpkg_find_acquire_program.cmake | 3 | ||||
| -rw-r--r-- | scripts/toolchains/android.cmake | 13 | ||||
| -rw-r--r-- | scripts/vcpkg_completion.bash | 17 |
3 files changed, 32 insertions, 1 deletions
diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index ebe46b335..b6cfc4aab 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -153,6 +153,9 @@ function(vcpkg_find_acquire_program VAR) set(URL "https://sourceforge.net/projects/winflexbison/files/winflexbison-2.5.16.zip/download") set(ARCHIVE "win_flex_bison-2.5.16.zip") set(HASH 0a14154bff5d998feb23903c46961528f8ccb4464375d5384db8c4a7d230c0c599da9b68e7a32f3217a0a0735742242eaf3769cb4f03e00931af8640250e9123) + if(NOT EXISTS "${PATHS}/data/m4sugar/m4sugar.m4" AND SUBDIR STREQUAL "win_flex-2.5.16") + file(REMOVE_RECURSE "${PATHS}") + endif() else() set(PROGNAME flex) set(APT_PACKAGE_NAME flex) diff --git a/scripts/toolchains/android.cmake b/scripts/toolchains/android.cmake index 893463056..69192aeca 100644 --- a/scripts/toolchains/android.cmake +++ b/scripts/toolchains/android.cmake @@ -1,11 +1,22 @@ set(ANDROID_CPP_FEATURES "rtti exceptions" CACHE STRING "")
set(CMAKE_SYSTEM_NAME Android CACHE STRING "")
-set(ANDROID_ABI x86_64 CACHE STRING "")
set(ANDROID_TOOLCHAIN clang CACHE STRING "")
set(ANDROID_NATIVE_API_LEVEL 21 CACHE STRING "")
set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang CACHE STRING "")
+if (VCPKG_TARGET_TRIPLET STREQUAL "arm64-android")
+ set(ANDROID_ABI arm64-v8a CACHE STRING "")
+elseif(VCPKG_TARGET_TRIPLET STREQUAL "arm-android")
+ set(ANDROID_ABI armeabi-v7a CACHE STRING "")
+elseif(VCPKG_TARGET_TRIPLET STREQUAL "x64-android")
+ set(ANDROID_ABI x86_64 CACHE STRING "")
+elseif(VCPKG_TARGET_TRIPLET STREQUAL "x86-android")
+ set(ANDROID_ABI x86 CACHE STRING "")
+else()
+ message(FATAL_ERROR "Unknown ABI for target triplet ${VCPKG_TARGET_TRIPLET}")
+endif()
+
if(DEFINED ENV{ANDROID_NDK_HOME})
set(ANDROID_NDK_HOME $ENV{ANDROID_NDK_HOME})
else()
diff --git a/scripts/vcpkg_completion.bash b/scripts/vcpkg_completion.bash new file mode 100644 index 000000000..804507d58 --- /dev/null +++ b/scripts/vcpkg_completion.bash @@ -0,0 +1,17 @@ +#/usr/bin/env bash + +_vcpkg_completions() +{ + local vcpkg_executable=${COMP_WORDS[0]} + local remaining_command_line=${COMP_LINE:(${#vcpkg_executable}+1)} + COMPREPLY=($(${vcpkg_executable} autocomplete "${remaining_command_line}" -- 2>/dev/null)) + + # Colon is treated as a delimiter in bash. The following workaround + # allows triplet completion to work correctly in the syntax: + # zlib:x64-windows + local cur + _get_comp_words_by_ref -n : cur + __ltrim_colon_completions "$cur" +} + +complete -F _vcpkg_completions vcpkg |
