aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDale Stammen <dalestam@microsoft.com>2017-01-12 20:39:49 -0800
committerDale Stammen <dalestam@microsoft.com>2017-01-12 20:39:49 -0800
commit7676b8780db1e1e591c4fc7eba4f96f73c428cb4 (patch)
tree6864d24f6ea1fc6acec7a54e0f2b7e80a54642dc /scripts
parent30429e68db721f542abf153293b49822c107870e (diff)
parent9072f51d746b857dfda19844cc773181d6d42382 (diff)
downloadvcpkg-7676b8780db1e1e591c4fc7eba4f96f73c428cb4.tar.gz
vcpkg-7676b8780db1e1e591c4fc7eba4f96f73c428cb4.zip
Merge branch 'master' into curl-uwp
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_find_acquire_program.cmake28
1 files changed, 22 insertions, 6 deletions
diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake
index b192bc5d7..ab0cf1587 100644
--- a/scripts/cmake/vcpkg_find_acquire_program.cmake
+++ b/scripts/cmake/vcpkg_find_acquire_program.cmake
@@ -46,8 +46,7 @@ function(vcpkg_find_acquire_program VAR)
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"
+ message(FATAL_ERROR "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"
)
@@ -58,6 +57,12 @@ function(vcpkg_find_acquire_program VAR)
set(URL "http://download.qt.io/official_releases/jom/jom_1_1_1.zip")
set(ARCHIVE "jom_1_1_1.zip")
set(HASH 23a26dc7e29979bec5dcd3bfcabf76397b93ace64f5d46f2254d6420158bac5eff1c1a8454e3427e7a2fe2c233c5f2cffc87b376772399e12e40b51be2c065f4)
+ elseif(VAR MATCHES "7Z")
+ set(PROGNAME 7z)
+ set(PATHS "C:/Program Files/7-Zip" ${DOWNLOADS}/tools/7z/Files/7-Zip)
+ set(URL "http://7-zip.org/a/7z1604.msi")
+ set(ARCHIVE "7z1604.msi")
+ set(HASH 556f95f7566fe23704d136239e4cf5e2a26f939ab43b44145c91b70d031a088d553e5c21301f1242a2295dcde3143b356211f0108c68e65eef8572407618326d)
else()
message(FATAL "unknown tool ${VAR} -- unable to acquire.")
endif()
@@ -72,10 +77,21 @@ function(vcpkg_find_acquire_program VAR)
if(DEFINED NOEXTRACT)
file(COPY ${DOWNLOADS}/${ARCHIVE} DESTINATION ${DOWNLOADS}/tools/${PROGNAME})
else()
- execute_process(
- COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE}
- WORKING_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}
- )
+ get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT)
+ string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION)
+ if(${ARCHIVE_EXTENSION} STREQUAL ".msi")
+ file(TO_NATIVE_PATH "${DOWNLOADS}/${ARCHIVE}" ARCHIVE_NATIVE_PATH)
+ file(TO_NATIVE_PATH "${DOWNLOADS}/tools/${PROGNAME}" DESTINATION_NATIVE_PATH)
+ execute_process(
+ COMMAND msiexec /a ${ARCHIVE_NATIVE_PATH} /qn TARGETDIR=${DESTINATION_NATIVE_PATH}
+ WORKING_DIRECTORY ${DOWNLOADS}
+ )
+ else()
+ execute_process(
+ COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE}
+ WORKING_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}
+ )
+ endif()
endif()
find_program(${VAR} ${PROGNAME} PATHS ${PATHS})