diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2016-11-28 17:17:28 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2016-11-28 17:17:28 -0800 |
| commit | d933562a584a9acb47dde9ba7e41f0128cb8763b (patch) | |
| tree | df7190ffe392050f98d20cb49eb8a673a12bb0bd /ports/libuv | |
| parent | d5ac945c2c56fadfcbd98843fcbc939108760d31 (diff) | |
| download | vcpkg-d933562a584a9acb47dde9ba7e41f0128cb8763b.tar.gz vcpkg-d933562a584a9acb47dde9ba7e41f0128cb8763b.zip | |
Move PYTHON2 "acquisition" to vcpkg_find_acquire_program
Diffstat (limited to 'ports/libuv')
| -rw-r--r-- | ports/libuv/portfile.cmake | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index f71ba9f88..173d3bcdc 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -16,38 +16,10 @@ if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src) ) endif() -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() +vcpkg_find_acquire_program(PYTHON2) -set(ENV{GYP_MSVS_VERSION} 2015) set(ENV{PYTHON} ${PYTHON2}) +set(ENV{GYP_MSVS_VERSION} 2015) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(LIBUV_LINKAGE shared) |
