aboutsummaryrefslogtreecommitdiff
path: root/scripts/cmake
diff options
context:
space:
mode:
authorAlexander Kaspar <alexander.kaspar@gmail.com>2016-11-30 19:10:23 +0100
committerAlexander Kaspar <alexander.kaspar@gmail.com>2016-11-30 19:10:23 +0100
commit255849a3c0d4638e37a538f9547625818516e6e4 (patch)
tree6022d8f7360e3ab5bb0bfc251c23226dcb66f079 /scripts/cmake
parent8de36e12dbd87db740a7ca089f3dcd1222a22637 (diff)
parent61e484a640884bc33ae3754f98006ebb1b4c1f1f (diff)
downloadvcpkg-255849a3c0d4638e37a538f9547625818516e6e4.tar.gz
vcpkg-255849a3c0d4638e37a538f9547625818516e6e4.zip
Merge branch 'master' of https://github.com/Microsoft/vcpkg into qca
Diffstat (limited to 'scripts/cmake')
-rw-r--r--scripts/cmake/vcpkg_find_acquire_program.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake
index 633721f0e..b192bc5d7 100644
--- a/scripts/cmake/vcpkg_find_acquire_program.cmake
+++ b/scripts/cmake/vcpkg_find_acquire_program.cmake
@@ -30,6 +30,28 @@ function(vcpkg_find_acquire_program VAR)
set(URL "https://www.python.org/ftp/python/3.5.2/python-3.5.2-embed-amd64.zip")
set(ARCHIVE "python-3.5.2-embed-amd64.zip")
set(HASH 48bdcb6f94c993acad6782ee33ad4a07a0ea3b9b1bfcdeadf446d459a9224336837e2e7b518d54d8d99c5c3f4e9f8877ea1789cae513fa2eda2a3cad9e4dfd8f)
+ elseif(VAR MATCHES "PYTHON2")
+ find_program(PYTHON2 NAMES python2 python PATHS C:/python27 ENV PYTHON)
+ if(NOT PYTHON2 MATCHES "NOTFOUND")
+ execute_process(
+ COMMAND ${PYTHON2} --version
+ OUTPUT_VARIABLE PYTHON_VER_CHECK_OUT
+ ERROR_VARIABLE PYTHON_VER_CHECK_ERR
+ )
+ set(PYTHON_VER_CHECK "${PYTHON_VER_CHECK_OUT}${PYTHON_VER_CHECK_ERR}")
+ debug_message("PYTHON_VER_CHECK=${PYTHON_VER_CHECK}")
+ if(NOT PYTHON_VER_CHECK MATCHES "Python 2.7")
+ set(PYTHON2 PYTHON2-NOTFOUND)
+ find_program(PYTHON2 NAMES python2 python PATHS C:/python27 ENV PYTHON NO_SYSTEM_ENVIRONMENT_PATH)
+ endif()
+ endif()
+ if(PYTHON2 MATCHES "NOTFOUND")
+ message(FATAL_ERROR "libuv uses the GYP build system, which requires Python 2.7.\n"
+ "Python 2.7 was not found in the path or by searching inside C:\\Python27.\n"
+ "There is no portable redistributable for Python 2.7, so you will need to install the MSI located at:\n"
+ " https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi\n"
+ )
+ endif()
elseif(VAR MATCHES "JOM")
set(PROGNAME jom)
set(PATHS ${DOWNLOADS}/tools/jom)