From 4ce8f0aa31da63f84fc81dfd895faaeb03d5c7b1 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 13 Oct 2017 21:25:18 -0700 Subject: new port: cgal --- scripts/cmake/vcpkg_from_github.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index 645690353..d14077410 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -80,6 +80,7 @@ function(vcpkg_from_github) else() # Sometimes GitHub strips a leading 'v' off the REF. string(REGEX REPLACE "^v" "" REF ${BASEREF}) + string(REPLACE "/" "-" REF ${REF}) set(SOURCE_PATH "${BASE}/${REPO_NAME}-${REF}") if(EXISTS ${SOURCE_PATH}) set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) -- cgit v1.2.3 From 81613fa0ff506852fbb90757fc27f87ffe591fee Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 16 Oct 2017 11:22:21 -0700 Subject: [vcpkg-toolchain] Improvements; add VCPKG_CHAINLOAD_TOOLCHAIN_FILE --- scripts/buildsystems/vcpkg.cmake | 267 ++++++++++++++++-------------- scripts/cmake/vcpkg_configure_cmake.cmake | 106 +++++++----- 2 files changed, 203 insertions(+), 170 deletions(-) (limited to 'scripts') diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index d8c7ee6b8..19fc99af7 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -1,156 +1,175 @@ # Mark variables as used so cmake doesn't complain about them -set(CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE}) -if(NOT VCPKG_TOOLCHAIN) - if(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$") +mark_as_advanced(CMAKE_TOOLCHAIN_FILE) + +if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") +endif() + +if(VCPKG_TOOLCHAIN) + return() +endif() + +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if( _CMAKE_IN_TRY_COMPILE ) + include( "${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg.config.cmake" OPTIONAL ) +endif() + +if(VCPKG_TARGET_TRIPLET) +elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$") + set(_VCPKG_TARGET_TRIPLET_ARCH x86) +elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$") + set(_VCPKG_TARGET_TRIPLET_ARCH x64) +elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$") + set(_VCPKG_TARGET_TRIPLET_ARCH arm) +else() + if(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 Win64$") + set(_VCPKG_TARGET_TRIPLET_ARCH x64) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 ARM$") + set(_VCPKG_TARGET_TRIPLET_ARCH arm) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) - elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$") + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 Win64$") set(_VCPKG_TARGET_TRIPLET_ARCH x64) - elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$") + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM") set(_VCPKG_TARGET_TRIPLET_ARCH arm) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017") + set(_VCPKG_TARGET_TRIPLET_ARCH x86) else() - if(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 Win64$") + find_program(_VCPKG_CL cl) + if(_VCPKG_CL MATCHES "amd64/cl.exe$" OR _VCPKG_CL MATCHES "x64/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH x64) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 ARM$") + elseif(_VCPKG_CL MATCHES "arm/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH arm) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015$") - set(_VCPKG_TARGET_TRIPLET_ARCH x86) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 Win64$") - set(_VCPKG_TARGET_TRIPLET_ARCH x64) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM") - set(_VCPKG_TARGET_TRIPLET_ARCH arm) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017") + elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) else() - find_program(_VCPKG_CL cl) - if(_VCPKG_CL MATCHES "amd64/cl.exe$" OR _VCPKG_CL MATCHES "x64/cl.exe$") - set(_VCPKG_TARGET_TRIPLET_ARCH x64) - elseif(_VCPKG_CL MATCHES "arm/cl.exe$") - set(_VCPKG_TARGET_TRIPLET_ARCH arm) - elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$") - set(_VCPKG_TARGET_TRIPLET_ARCH x86) - else() - message(FATAL_ERROR "Unable to determine target architecture.") - endif() + message(FATAL_ERROR "Unable to determine target architecture.") endif() endif() +endif() - if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") - set(_VCPKG_TARGET_TRIPLET_PLAT uwp) - else() - set(_VCPKG_TARGET_TRIPLET_PLAT windows) - endif() +if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") + set(_VCPKG_TARGET_TRIPLET_PLAT uwp) +else() + set(_VCPKG_TARGET_TRIPLET_PLAT windows) +endif() - set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)") - set(_VCPKG_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR}) +set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)") +set(_VCPKG_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR}) - #Detect .vcpkg-root to figure VCPKG_ROOT_DIR - SET(_VCPKG_ROOT_DIR_CANDIDATE ${CMAKE_CURRENT_LIST_DIR}) - while(IS_DIRECTORY ${_VCPKG_ROOT_DIR_CANDIDATE} AND NOT EXISTS "${_VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root") - get_filename_component(_VCPKG_ROOT_DIR_TEMP ${_VCPKG_ROOT_DIR_CANDIDATE} DIRECTORY) - if (_VCPKG_ROOT_DIR_TEMP STREQUAL _VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive - message(FATAL_ERROR "Could not find .vcpkg-root") - else() - SET(_VCPKG_ROOT_DIR_CANDIDATE ${_VCPKG_ROOT_DIR_TEMP}) - endif() - endwhile() - set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE}) - set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed) - - if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) - list(APPEND CMAKE_PREFIX_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug - ) - list(APPEND CMAKE_LIBRARY_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link - ) +# Detect .vcpkg-root to figure VCPKG_ROOT_DIR +set(_VCPKG_ROOT_DIR_CANDIDATE ${CMAKE_CURRENT_LIST_DIR}) +while(IS_DIRECTORY ${_VCPKG_ROOT_DIR_CANDIDATE} AND NOT EXISTS "${_VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root") + get_filename_component(_VCPKG_ROOT_DIR_TEMP ${_VCPKG_ROOT_DIR_CANDIDATE} DIRECTORY) + if (_VCPKG_ROOT_DIR_TEMP STREQUAL _VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive + message(FATAL_ERROR "Could not find .vcpkg-root") + else() + SET(_VCPKG_ROOT_DIR_CANDIDATE ${_VCPKG_ROOT_DIR_TEMP}) endif() +endwhile() +set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE}) +set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed) + +if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) list(APPEND CMAKE_PREFIX_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ) list(APPEND CMAKE_LIBRARY_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link ) +endif() +list(APPEND CMAKE_PREFIX_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} +) +list(APPEND CMAKE_LIBRARY_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link +) - set(Boost_COMPILER "-vc140") +set(Boost_COMPILER "-vc140") - if (NOT DEFINED CMAKE_SYSTEM_VERSION) - include(${_VCPKG_ROOT_DIR}/scripts/cmake/vcpkg_get_windows_sdk.cmake) - # This is used as an implicit parameter for vcpkg_get_windows_sdk - set(VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR}) - vcpkg_get_windows_sdk(WINDOWS_SDK_VERSION) - unset(VCPKG_ROOT_DIR) - set(CMAKE_SYSTEM_VERSION ${WINDOWS_SDK_VERSION}) - endif() +if (NOT DEFINED CMAKE_SYSTEM_VERSION) + include(${_VCPKG_ROOT_DIR}/scripts/cmake/vcpkg_get_windows_sdk.cmake) + # This is used as an implicit parameter for vcpkg_get_windows_sdk + set(VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR}) + vcpkg_get_windows_sdk(WINDOWS_SDK_VERSION) + unset(VCPKG_ROOT_DIR) + set(CMAKE_SYSTEM_VERSION ${WINDOWS_SDK_VERSION} CACHE STRING "Windows SDK version") +endif() - file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles) - set(CMAKE_SYSTEM_IGNORE_PATH - "${_programfiles}/OpenSSL" - "${_programfiles}/OpenSSL-Win32" - "${_programfiles}/OpenSSL-Win64" - "${_programfiles}/OpenSSL-Win32/lib/VC" - "${_programfiles}/OpenSSL-Win64/lib/VC" - "${_programfiles}/OpenSSL-Win32/lib/VC/static" - "${_programfiles}/OpenSSL-Win64/lib/VC/static" - "C:/OpenSSL/" - "C:/OpenSSL-Win32/" - "C:/OpenSSL-Win64/" - "C:/OpenSSL-Win32/lib/VC" - "C:/OpenSSL-Win64/lib/VC" - "C:/OpenSSL-Win32/lib/VC/static" - "C:/OpenSSL-Win64/lib/VC/static" - ) +file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles) +set(CMAKE_SYSTEM_IGNORE_PATH + "${_programfiles}/OpenSSL" + "${_programfiles}/OpenSSL-Win32" + "${_programfiles}/OpenSSL-Win64" + "${_programfiles}/OpenSSL-Win32/lib/VC" + "${_programfiles}/OpenSSL-Win64/lib/VC" + "${_programfiles}/OpenSSL-Win32/lib/VC/static" + "${_programfiles}/OpenSSL-Win64/lib/VC/static" + "C:/OpenSSL/" + "C:/OpenSSL-Win32/" + "C:/OpenSSL-Win64/" + "C:/OpenSSL-Win32/lib/VC" + "C:/OpenSSL-Win64/lib/VC" + "C:/OpenSSL-Win32/lib/VC/static" + "C:/OpenSSL-Win64/lib/VC/static" +) - set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools) - file(GLOB _VCPKG_TOOLS_DIRS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*) - foreach(_VCPKG_TOOLS_DIR ${_VCPKG_TOOLS_DIRS}) - if(IS_DIRECTORY ${_VCPKG_TOOLS_DIR}) - set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_TOOLS_DIR}) - endif() - endforeach() - - option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON) - function(add_executable name) - _add_executable(${ARGV}) - list(FIND ARGV "IMPORTED" IMPORTED_IDX) - list(FIND ARGV "ALIAS" ALIAS_IDX) - if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) - if(VCPKG_APPLOCAL_DEPS) - add_custom_command(TARGET ${name} POST_BUILD - COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 - -targetBinary $ - -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/bin" - -OutVariable out - ) - endif() - set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) - set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) - endif() - endfunction() - - function(add_library name) - _add_library(${ARGV}) - list(FIND ARGV "IMPORTED" IMPORTED_IDX) - list(FIND ARGV "INTERFACE" INTERFACE_IDX) - list(FIND ARGV "ALIAS" ALIAS_IDX) - if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) - set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) - set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) - endif() - endfunction() +set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools) +file(GLOB _VCPKG_TOOLS_DIRS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*) +foreach(_VCPKG_TOOLS_DIR ${_VCPKG_TOOLS_DIRS}) + if(IS_DIRECTORY ${_VCPKG_TOOLS_DIR}) + set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_TOOLS_DIR}) + endif() +endforeach() - macro(find_package name) - if(name STREQUAL "Boost") - unset(Boost_USE_STATIC_LIBS) +option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON) +function(add_executable name) + _add_executable(${ARGV}) + list(FIND ARGV "IMPORTED" IMPORTED_IDX) + list(FIND ARGV "ALIAS" ALIAS_IDX) + if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) + if(VCPKG_APPLOCAL_DEPS) + add_custom_command(TARGET ${name} POST_BUILD + COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 + -targetBinary $ + -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/bin" + -OutVariable out + ) endif() - _find_package(${ARGV}) - endmacro() + set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) + set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) + endif() +endfunction() - set(VCPKG_TOOLCHAIN ON) -endif() +function(add_library name) + _add_library(${ARGV}) + list(FIND ARGV "IMPORTED" IMPORTED_IDX) + list(FIND ARGV "INTERFACE" INTERFACE_IDX) + list(FIND ARGV "ALIAS" ALIAS_IDX) + if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) + set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) + set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) + endif() +endfunction() + +macro(find_package name) + if(name STREQUAL "Boost") + unset(Boost_USE_STATIC_LIBS) + endif() + _find_package(${ARGV}) +endmacro() -set(_UNUSED ${CMAKE_TOOLCHAIN_FILE}) +set(VCPKG_TOOLCHAIN ON) set(_UNUSED ${CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION}) set(_UNUSED ${CMAKE_EXPORT_NO_PACKAGE_REGISTRY}) set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY}) set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY}) set(_UNUSED ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP}) + +if(NOT _CMAKE_IN_TRY_COMPILE) + file(TO_CMAKE_PATH "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" _chainload_file) + file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vcpkg.config.cmake" + "set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")\n" + "set(VCPKG_APPLOCAL_DEPS \"${VCPKG_APPLOCAL_DEPS}\" CACHE STRING \"\")\n" + "set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE \"${_chainload_file}\" CACHE STRING \"\")\n") +endif() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index bfb6a19fd..b979245aa 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -61,37 +61,39 @@ function(vcpkg_configure_cmake) set(GENERATOR ${_csc_GENERATOR}) elseif(_csc_PREFER_NINJA AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT _csc_HOST_ARCHITECTURE STREQUAL "x86") set(GENERATOR "Ninja") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 Win64") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 ARM") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 Win64") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 ARM") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 Win64") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 ARM") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") set(ARCH "ARM64") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 Win64") - elseif(TRIPLET_SYSTEM_ARCH STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 ARM") - elseif(TRIPLET_SYSTEM_ARCH STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") set(ARCH "ARM64") + else() + message(FATAL_ERROR "Unable to determine appropriate generator for: ${VCPKG_CMAKE_SYSTEM_NAME}-${VCPKG_TARGET_ARCHITECTURE}-${VCPKG_PLATFORM_TOOLSET}") endif() # If we use Ninja, make sure it's on PATH @@ -104,15 +106,18 @@ function(vcpkg_configure_cmake) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) if(DEFINED VCPKG_CMAKE_SYSTEM_NAME) - list(APPEND _csc_OPTIONS -DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}) + list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}") endif() if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION) - list(APPEND _csc_OPTIONS -DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}) + list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") endif() - if(DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=ON) - elseif(DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL static) + elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=OFF) + else() + message(FATAL_ERROR "Invalid setting for VCPKG_LIBRARY_LINKAGE: \"${VCPKG_LIBRARY_LINKAGE}\". It must be \"static\" or \"dynamic\"") endif() if((NOT DEFINED VCPKG_CXX_FLAGS_DEBUG AND NOT DEFINED VCPKG_C_FLAGS_DEBUG) OR @@ -131,10 +136,45 @@ function(vcpkg_configure_cmake) message(FATAL_ERROR "You must set both the VCPKG_CXX_FLAGS and VCPKG_C_FLAGS") endif() + if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") + else() + set(VCPKG_CXX_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}") + set(VCPKG_C_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}") + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + list(APPEND _csc_OPTIONS_DEBUG + "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" + "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" + ) + list(APPEND _csc_OPTIONS_RELEASE + "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" + "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" + ) + elseif(VCPKG_CRT_LINKAGE STREQUAL "static") + list(APPEND _csc_OPTIONS_DEBUG + "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" + "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" + ) + list(APPEND _csc_OPTIONS_RELEASE + "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" + "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" + ) + else() + message(FATAL_ERROR "Invalid setting for VCPKG_CRT_LINKAGE: \"${VCPKG_CRT_LINKAGE}\". It must be \"static\" or \"dynamic\"") + endif() + + list(APPEND _csc_OPTIONS_RELEASE + "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" + "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" + ) + list(APPEND _csc_OPTIONS + "-DCMAKE_CXX_FLAGS=${VCPKG_CXX_FLAGS}" + "-DCMAKE_C_FLAGS=${VCPKG_C_FLAGS}" + ) + endif() + list(APPEND _csc_OPTIONS "-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}" - "-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}" - "-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" @@ -151,32 +191,6 @@ function(vcpkg_configure_cmake) ) endif() - if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) - list(APPEND _csc_OPTIONS_DEBUG - "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" - "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" - ) - list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" - "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" - ) - - elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) - list(APPEND _csc_OPTIONS_DEBUG - "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" - "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" - ) - list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" - "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" - ) - endif() - - list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" - "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) vcpkg_execute_required_process( -- cgit v1.2.3 From 374253cb1b12a60925693130132f1a6ab6c3a83a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 15:39:41 -0700 Subject: [ninja] Update to 1.8.2 --- scripts/cmake/vcpkg_find_acquire_program.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 51e394bf1..b81675c13 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -101,11 +101,11 @@ function(vcpkg_find_acquire_program VAR) set(HASH 556f95f7566fe23704d136239e4cf5e2a26f939ab43b44145c91b70d031a088d553e5c21301f1242a2295dcde3143b356211f0108c68e65eef8572407618326d) elseif(VAR MATCHES "NINJA") set(PROGNAME ninja) - set(SUBDIR "ninja-1.7.2") + set(SUBDIR "ninja-1.8.2") set(PATHS ${DOWNLOADS}/tools/ninja/${SUBDIR}) - set(URL "https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip") - set(ARCHIVE "ninja-win.zip") - set(HASH cccab9281b274c564f9ad77a2115be1f19be67d7b2ee14a55d1db1b27f3b68db8e76076e4f804b61eb8e573e26a8ecc9985675a8dcf03fd7a77b7f57234f1393) + set(URL "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip") + set(ARCHIVE "ninja-1.8.2-win.zip") + set(HASH 9b9ce248240665fcd6404b989f3b3c27ed9682838225e6dc9b67b551774f251e4ff8a207504f941e7c811e7a8be1945e7bcb94472a335ef15e23a0200a32e6d5) elseif(VAR MATCHES "MESON") set(PROGNAME meson) set(REQUIRED_INTERPRETER PYTHON3) -- cgit v1.2.3 From e8f64049cf5d4b2f1b76bab49d5134bdd0dff1ea Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 17:02:59 -0700 Subject: Fix getWindowsSDK.ps1 error when $path is $null --- scripts/getWindowsSDK.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'scripts') diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 index 8ef26a436..ed2fd11c7 100644 --- a/scripts/getWindowsSDK.ps1 +++ b/scripts/getWindowsSDK.ps1 @@ -19,6 +19,11 @@ $validInstances = New-Object System.Collections.ArrayList # Windows 10 SDK function CheckWindows10SDK($path) { + if ($path -eq $null) + { + return + } + $folder = (Join-Path $path "Include") if (!(Test-Path $folder)) { @@ -64,6 +69,11 @@ CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10") # Windows 8.1 SDK function CheckWindows81SDK($path) { + if ($path -eq $null) + { + return + } + $folder = "$path\Include" if (!(Test-Path $folder)) { -- cgit v1.2.3 From 0051e7477be15c9746e9fb2babe15aaec47a7eef Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 17:04:55 -0700 Subject: [findVS] Add detection for VS2015 Build Tools --- scripts/findVisualStudioInstallationInstances.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'scripts') diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index b2f186478..8a2adca10 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -32,6 +32,21 @@ foreach ($instance in $asXml.instances.instance) $results.Add("${releaseType}::${installationVersion}::${installationPath}") > $null } +# If nothing is found, attempt to find VS2015 Build Tools (not detected by vswhere.exe) +if ($results.Count -eq 0) +{ + $programFiles = & $scriptsDir\getProgramFiles32bit.ps1 + $installationPath = "$programFiles\Microsoft Visual Studio 14.0" + $clExe = "$installationPath\VC\bin\cl.exe" + $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" + + if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) + { + return "PreferenceWeight1::Legacy::14.0::$installationPath" + } +} + + $results.Sort() $results.Reverse() -- cgit v1.2.3 From 87296823ac9cc939c233caf7c02585b5fe6d3df7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 12:41:34 -0700 Subject: [cmake] Update to 3.9.4 (was 3.9.3) --- scripts/fetchDependency.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 773ebeac4..b43fd0cb5 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -107,12 +107,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if($Dependency -eq "cmake") { - $requiredVersion = "3.9.3" - $downloadVersion = "3.9.3" - $url = "https://cmake.org/files/v3.9/cmake-3.9.3-win32-x86.zip" - $downloadPath = "$downloadsDir\cmake-3.9.3-win32-x86.zip" - $expectedDownloadedFileHash = "47870e3d4c9a5aa019e71020cd85cc60b6f2d2569fb239eaec204cd991e512f1" - $executableFromDownload = "$downloadsDir\cmake-3.9.3-win32-x86\bin\cmake.exe" + $requiredVersion = "3.9.4" + $downloadVersion = "3.9.4" + $url = "https://cmake.org/files/v3.9/cmake-3.9.4-win32-x86.zip" + $downloadPath = "$downloadsDir\cmake-3.9.4-win32-x86.zip" + $expectedDownloadedFileHash = "8214df1ff51f9a6a1f0e27f9bd18f402b1749c5b645fbf6e401bcb00047171cd" + $executableFromDownload = "$downloadsDir\cmake-3.9.4-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP $extractionFolder = $downloadsDir } -- cgit v1.2.3 From edb718e21b56ab62a6544a26c1bba450d952b32d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:19:14 -0700 Subject: [fetchDependency] Introduce Test-Command function --- scripts/fetchDependency.ps1 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index b43fd0cb5..ac4ab5f46 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -14,6 +14,11 @@ $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" +function Test-Command($commandName) +{ + return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) +} + function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { function performDownload( [Parameter(Mandatory=$true)][string]$Dependency, -- cgit v1.2.3 From 147cde8bfda4e7283e4d47cd8a55c5bd0c689081 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:19:42 -0700 Subject: [fetchDependency] Use Expand-Archive if it exists, otherwise fallback to cmd --- scripts/fetchDependency.ps1 | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index ac4ab5f46..6024895ae 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -101,12 +101,19 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) New-Item -ItemType Directory -Path $destination | Out-Null } - $shell = new-object -com shell.application - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) + if (Test-Command -commandName 'Expand-Archive') { - # Piping to Out-Null is used to block until finished - $shell.Namespace($destination).copyhere($item) | Out-Null + Expand-Archive -path $file -destinationpath $destination + } + else + { + $shell = new-object -com shell.application + $zip = $shell.NameSpace($file) + foreach($item in $zip.items()) + { + # Piping to Out-Null is used to block until finished + $shell.Namespace($destination).copyhere($item) | Out-Null + } } } -- cgit v1.2.3 From 7fac8a06c091c7d6a0a9dd059166d4320cd86267 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:40:01 -0700 Subject: [fetchDependency] Add Test-Module function --- scripts/fetchDependency.ps1 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6024895ae..2ba98ab23 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -3,6 +3,16 @@ param( [string]$Dependency ) +function Test-Command($commandName) +{ + return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) +} + +function Test-Module($moduleName) +{ + return [bool](Get-Module -ListAvailable -Name $moduleName) +} + if ($PSVersionTable.PSEdition -ne "Core") { Import-Module BitsTransfer -Verbose:$false } @@ -14,11 +24,6 @@ $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" -function Test-Command($commandName) -{ - return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) -} - function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { function performDownload( [Parameter(Mandatory=$true)][string]$Dependency, -- cgit v1.2.3 From 451c1c96be2407da0e590344c655a8df838d3f99 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:42:58 -0700 Subject: [fetchDependency] Use Test-Module for BitsTransfer module check --- scripts/fetchDependency.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 2ba98ab23..58f64b626 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -13,7 +13,8 @@ function Test-Module($moduleName) return [bool](Get-Module -ListAvailable -Name $moduleName) } -if ($PSVersionTable.PSEdition -ne "Core") { +if (Test-Module -moduleName 'BitsTransfer') +{ Import-Module BitsTransfer -Verbose:$false } -- cgit v1.2.3 From d6d5540cc54c5d3dcbb43bdc6d0fd5b2d6271d21 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:45:41 -0700 Subject: [fetchDependency] Call Start-BitsTransfer if available, otherwise fallback --- scripts/fetchDependency.ps1 | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 58f64b626..d2e2b89fd 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -57,12 +57,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $WC.Proxy.Credentials=$ProxyCred } - if (($PSVersionTable.PSEdition -ne "Core") -and ($Dependency -ne "git")) # git fails with BITS + # git and installerbase fail with Start-BitsTransfer + if ((Test-Command -commandName 'Start-BitsTransfer') -and ($Dependency -ne "git")-and ($Dependency -ne "installerbase")) { - try { + try + { Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop + return } - catch [System.Exception] { + catch [System.Exception] + { # If BITS fails for any reason, delete any potentially partially downloaded files and continue if (Test-Path $downloadPath) { @@ -70,11 +74,9 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } } } - if (!(Test-Path $downloadPath)) - { - Write-Verbose("Downloading $Dependency...") - $WC.DownloadFile($url, $downloadPath) - } + + Write-Verbose("Downloading $Dependency...") + $WC.DownloadFile($url, $downloadPath) } # Enums (without resorting to C#) are only available on powershell 5+. -- cgit v1.2.3 From ffd91c0c1d071378d383ad94ba915e2c10dff06b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:58:36 -0700 Subject: [fetchDependency] Call Get-FileHash if available, otherwise fallback --- scripts/fetchDependency.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index d2e2b89fd..e8c66c84d 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -194,17 +194,17 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) performDownload $Dependency $url $downloadsDir $downloadPath $downloadVersion $requiredVersion #calculating the hash - if ($PSVersionTable.PSEdition -ne "Core") + if (Test-Command -commandName 'Get-FileHash') + { + $downloadedFileHash = (Get-FileHash -Path $downloadPath -Algorithm SHA256).Hash + } + else { $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA256") $fileAsByteArray = [io.File]::ReadAllBytes($downloadPath) $hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray) $downloadedFileHash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_}) } - else - { - $downloadedFileHash = (Get-FileHash -Path $downloadPath -Algorithm SHA256).Hash - } if ($expectedDownloadedFileHash -ne $downloadedFileHash) { -- cgit v1.2.3 From fa4e54a37356ad0200ce6387541ef78997b8a87e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 14:05:55 -0700 Subject: [git] Update to 2.14.2.3 (was 2.14.1) --- scripts/fetchDependency.ps1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index e8c66c84d..86bf103a8 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -158,16 +158,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "git") { - $requiredVersion = "2.14.1" - $downloadVersion = "2.14.1" - $url = "https://github.com/git-for-windows/git/releases/download/v2.14.1.windows.1/MinGit-2.14.1-32-bit.zip" # We choose the 32-bit version - $downloadPath = "$downloadsDir\MinGit-2.14.1-32-bit.zip" - $expectedDownloadedFileHash = "77b468e0ead1e7da4cb3a1cf35dabab5210bf10457b4142f5e9430318217cdef" + $requiredVersion = "2.14.2" + $downloadVersion = "2.14.2" + $url = "https://github.com/git-for-windows/git/releases/download/v2.14.2.windows.3/MinGit-2.14.2.3-32-bit.zip" # We choose the 32-bit version + $downloadPath = "$downloadsDir\MinGit-2.14.2.3-32-bit.zip" + $expectedDownloadedFileHash = "7cc1f27e1cfe79381e1a504a5fc7bc33951ac9031cd14c3bf478769d21a26cce" # There is another copy of git.exe in MinGit\bin. However, an installed version of git add the cmd dir to the PATH. # Therefore, choosing the cmd dir here as well. - $executableFromDownload = "$downloadsDir\MinGit-2.14.1-32-bit\cmd\git.exe" + $executableFromDownload = "$downloadsDir\MinGit-2.14.2.3-32-bit\cmd\git.exe" $extractionType = $ExtractionType_ZIP - $extractionFolder = "$downloadsDir\MinGit-2.14.1-32-bit" + $extractionFolder = "$downloadsDir\MinGit-2.14.2.3-32-bit" } elseif($Dependency -eq "installerbase") { -- cgit v1.2.3 From 508c21a6f8dece3c2793b302a926d1e663eb8526 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 14:08:30 -0700 Subject: [vswhere] Update to 2.2.7 (was 2.2.3) --- scripts/fetchDependency.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 86bf103a8..1677cb869 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -148,11 +148,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "vswhere") { - $requiredVersion = "2.2.3" - $downloadVersion = "2.2.3" - $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.3/vswhere.exe" + $requiredVersion = "2.2.7" + $downloadVersion = "2.2.7" + $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.7/vswhere.exe" $downloadPath = "$downloadsDir\vswhere-$downloadVersion\vswhere.exe" - $expectedDownloadedFileHash = "5f19066ac91635ad17d33fe0f79fc63c672a46f98c0358589a90163bcb2733e8" + $expectedDownloadedFileHash = "f50303881da706132516d9decfd5314d524a0044daf49c0cfd21dc39c1261ec3" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } -- cgit v1.2.3 From e9ba8b0ecbe5c49cda2710acaae0983dfe2552f9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 14:19:48 -0700 Subject: [nuget] Update to 4.4.0 (was 4.3.0) --- scripts/fetchDependency.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 1677cb869..df03878eb 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -138,11 +138,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "nuget") { - $requiredVersion = "4.3.0" - $downloadVersion = "4.3.0" - $url = "https://dist.nuget.org/win-x86-commandline/v4.3.0/nuget.exe" + $requiredVersion = "4.4.0" + $downloadVersion = "4.4.0" + $url = "https://dist.nuget.org/win-x86-commandline/v4.4.0/nuget.exe" $downloadPath = "$downloadsDir\nuget-$downloadVersion\nuget.exe" - $expectedDownloadedFileHash = "386da77a8cf2b63d1260b7020feeedabfe3b65ab31d20e6a313a530865972f3a" + $expectedDownloadedFileHash = "2cf9b118937eef825464e548f0c44f7f64090047746de295d75ac3dcffa3e1f6" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } -- cgit v1.2.3 From 11fdd415dd21f85292260a64fa9d52d872697e7c Mon Sep 17 00:00:00 2001 From: bahaki386 Date: Wed, 18 Oct 2017 19:38:25 +0900 Subject: Update Meson to 0.43.0 Upedate Meson to 0.43.0. It will fix Issue #2006. --- scripts/cmake/vcpkg_find_acquire_program.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index b81675c13..fdee0cb1f 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -110,10 +110,10 @@ function(vcpkg_find_acquire_program VAR) set(PROGNAME meson) set(REQUIRED_INTERPRETER PYTHON3) set(SCRIPTNAME meson.py) - set(PATHS ${DOWNLOADS}/tools/meson/meson-0.40.1) - set(URL "https://github.com/mesonbuild/meson/archive/0.40.1.zip") - set(ARCHIVE "meson-0.40.1.zip") - set(HASH 4c1d07f32d527859f762c34de74d31d569573fc833335ab9652ed38d1f9e64b49869e826527c28a6a07cb8e594fd5c647b34aa95e626236a2707f75df0a2d435) + set(PATHS ${DOWNLOADS}/tools/meson/meson-0.43.0) + set(URL "https://github.com/mesonbuild/meson/archive/0.43.0.zip") + set(ARCHIVE "meson-0.43.0.zip") + set(HASH dde4de72eff37046731224f32aa5f4618d45bdf148cec2d1af6e25e7522ebc2b04aedc9eceed483dfa93823a0ea7ea472d0c0c9380061bf3ee2f16b87dd1425e) elseif(VAR MATCHES "FLEX") set(PROGNAME win_flex) set(PATHS ${DOWNLOADS}/tools/win_flex) -- cgit v1.2.3 From f527812e9e7f6436aa11c9f01b7f70e4c4893270 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 19 Oct 2017 08:53:59 -0700 Subject: [grpc] Fix absolute paths in installed cmake files. --- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index eaf3bb966..40ed0225f 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -83,6 +83,7 @@ function(vcpkg_fixup_cmake_targets) ) foreach(RELEASE_TARGET ${RELEASE_TARGETS}) file(READ ${RELEASE_TARGET} _contents) + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" _contents "${_contents}") string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+\\.exe)" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") file(WRITE ${RELEASE_TARGET} "${_contents}") endforeach() @@ -95,6 +96,7 @@ function(vcpkg_fixup_cmake_targets) get_filename_component(DEBUG_TARGET_NAME ${DEBUG_TARGET} NAME) file(READ ${DEBUG_TARGET} _contents) + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" _contents "${_contents}") string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+\\.exe)" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") string(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" _contents "${_contents}") string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" _contents "${_contents}") -- cgit v1.2.3 From 50ae9eec872a0802d2450b4ae2d640475d0d7889 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 19 Oct 2017 19:50:23 -0700 Subject: Do not depend on newlines when getting output from powershell --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 3 ++- scripts/findVisualStudioInstallationInstances.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index e9fb60cb2..3269562dc 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -9,8 +9,9 @@ $explicitlyRequestedVSPath = $explicitlyRequestedVSPath -replace "\\$" # Remove $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstallationInstances))" -foreach ($instanceCandidate in $VisualStudioInstallationInstances) +foreach ($instanceCandidateWithEOL in $VisualStudioInstallationInstances) { + $instanceCandidate = $instanceCandidateWithEOL -replace "::" Write-Verbose "Inspecting: $instanceCandidate" $split = $instanceCandidate -split "::" # $preferenceWeight = $split[0] diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 8a2adca10..566560cdb 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -29,7 +29,7 @@ foreach ($instance in $asXml.instances.instance) } # Placed like that for easy sorting according to preference - $results.Add("${releaseType}::${installationVersion}::${installationPath}") > $null + $results.Add("${releaseType}::${installationVersion}::${installationPath}::") > $null } # If nothing is found, attempt to find VS2015 Build Tools (not detected by vswhere.exe) @@ -42,7 +42,7 @@ if ($results.Count -eq 0) if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) { - return "PreferenceWeight1::Legacy::14.0::$installationPath" + return "PreferenceWeight1::Legacy::14.0::$installationPath::" } } -- cgit v1.2.3 From 2a617103266e8cc391197126fa16c29f65f13ca5 Mon Sep 17 00:00:00 2001 From: Sean Warren Date: Mon, 23 Oct 2017 11:01:40 +1100 Subject: Remove non-numeric characters from Windows SDK version string See issue #1836, #2019 --- scripts/cmake/vcpkg_get_windows_sdk.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_get_windows_sdk.cmake b/scripts/cmake/vcpkg_get_windows_sdk.cmake index 64d8838e7..a8aad64a9 100644 --- a/scripts/cmake/vcpkg_get_windows_sdk.cmake +++ b/scripts/cmake/vcpkg_get_windows_sdk.cmake @@ -10,7 +10,7 @@ function(vcpkg_get_windows_sdk ret) message(FATAL_ERROR "Could not find Windows SDK") endif() - # Remove trailing newline - string(REGEX REPLACE "\n$" "" WINDOWS_SDK "${WINDOWS_SDK}") + # Remove trailing newline and non-numeric characters + string(REGEX REPLACE "[^0-9.]" "" WINDOWS_SDK "${WINDOWS_SDK}") set(${ret} ${WINDOWS_SDK} PARENT_SCOPE) endfunction() \ No newline at end of file -- cgit v1.2.3 From aec9215800a42e7e4ec28aad756695a8ced8876c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 24 Oct 2017 17:08:24 -0700 Subject: [InternalCI.ps1] Fix error when buildtrees/ does not exist --- scripts/internalCI.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/internalCI.ps1 b/scripts/internalCI.ps1 index 887eb7bea..16ce4fc7a 100644 --- a/scripts/internalCI.ps1 +++ b/scripts/internalCI.ps1 @@ -5,7 +5,10 @@ New-Item -type directory downloads -errorAction SilentlyContinue | Out-Null if (-not $?) { throw $? } # Clear out any intermediate files from the previous build -Get-ChildItem buildtrees/*/* | ? { $_.Name -ne "src" -and $_.Extension -ne ".log"} | Remove-Item -Recurse -Force +if (Test-Path buildtrees) +{ + Get-ChildItem buildtrees/*/* | ? { $_.Name -ne "src" -and $_.Extension -ne ".log"} | Remove-Item -Recurse -Force +} # Purge any outdated packages ./vcpkg remove --outdated --recurse -- cgit v1.2.3 From 4b66571c9d12cf718e3175203a867d5014208fdb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 26 Oct 2017 22:34:54 -0700 Subject: [blaze] Add dependencies and install *-config.cmake files. --- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 40ed0225f..069672b71 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -23,7 +23,7 @@ function(vcpkg_fixup_cmake_targets) set(DEBUG_SHARE ${CURRENT_PACKAGES_DIR}/debug/share/${PORT}) set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/share/${PORT}) - if(_vfct_CONFIG_PATH) + if(_vfct_CONFIG_PATH AND NOT RELEASE_SHARE STREQUAL "${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}") set(DEBUG_CONFIG ${CURRENT_PACKAGES_DIR}/debug/${_vfct_CONFIG_PATH}) set(RELEASE_CONFIG ${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}) @@ -31,10 +31,14 @@ function(vcpkg_fixup_cmake_targets) message(FATAL_ERROR "'${DEBUG_CONFIG}' does not exist.") endif() - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/share) - file(RENAME ${DEBUG_CONFIG} ${DEBUG_SHARE}) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) - file(RENAME ${RELEASE_CONFIG} ${RELEASE_SHARE}) + file(MAKE_DIRECTORY ${DEBUG_SHARE}) + file(GLOB FILES ${DEBUG_CONFIG}/*) + file(COPY ${FILES} DESTINATION ${DEBUG_SHARE}) + file(REMOVE_RECURSE ${DEBUG_CONFIG}) + + file(GLOB FILES ${RELEASE_CONFIG}/*) + file(COPY ${FILES} DESTINATION ${RELEASE_SHARE}) + file(REMOVE_RECURSE ${RELEASE_CONFIG}) get_filename_component(DEBUG_CONFIG_DIR_NAME ${DEBUG_CONFIG} NAME) string(TOLOWER "${DEBUG_CONFIG_DIR_NAME}" DEBUG_CONFIG_DIR_NAME) -- cgit v1.2.3 From 83c29df043ce91d37a0c463ed854e78caba53984 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 14:45:08 -0700 Subject: [fetchDependency] Fix compat with Powershell 2 --- scripts/fetchDependency.ps1 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index df03878eb..90de17717 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -8,6 +8,11 @@ function Test-Command($commandName) return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) } +function Test-CommandParameter($commandName, $parameterName) +{ + return (Get-Command $commandName).Parameters.Keys -contains $parameterName +} + function Test-Module($moduleName) { return [bool](Get-Module -ListAvailable -Name $moduleName) @@ -51,7 +56,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $ProxyAuth = !$WC.Proxy.IsBypassed($url) if ($ProxyAuth) { - $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication" + if (Test-CommandParameter -commandName 'Get-Credential' -parameterName 'Message') + { + $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication" + } + else + { + "Enter credentials for Proxy Authentication" + $ProxyCred = Get-Credential + } + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred) $WC.Proxy.Credentials=$ProxyCred -- cgit v1.2.3 From 0796a9df0e4d171ef2c7ab4d0c16ef4dc496ee5c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 18:53:36 -0700 Subject: [git] Update to 2.14.3 (was 2.14.2.3) --- scripts/bootstrap.ps1 | 2 +- scripts/fetchDependency.ps1 | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index b874afd8c..4488d9b95 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -13,7 +13,7 @@ $gitHash = "unknownhash" $oldpath = $env:path try { - $env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.1-32-bit\cmd" + $env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.3-32-bit\cmd" if (Get-Command "git" -ErrorAction SilentlyContinue) { $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 90de17717..89e37c428 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -172,16 +172,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "git") { - $requiredVersion = "2.14.2" - $downloadVersion = "2.14.2" - $url = "https://github.com/git-for-windows/git/releases/download/v2.14.2.windows.3/MinGit-2.14.2.3-32-bit.zip" # We choose the 32-bit version - $downloadPath = "$downloadsDir\MinGit-2.14.2.3-32-bit.zip" - $expectedDownloadedFileHash = "7cc1f27e1cfe79381e1a504a5fc7bc33951ac9031cd14c3bf478769d21a26cce" + $requiredVersion = "2.14.3" + $downloadVersion = "2.14.3" + $url = "https://github.com/git-for-windows/git/releases/download/v2.14.3.windows.1/MinGit-2.14.3-32-bit.zip" + $downloadPath = "$downloadsDir\MinGit-2.14.3-32-bit.zip" + $expectedDownloadedFileHash = "a91385acb1da220612790807c41d0f304b41093c474b9d7342230ec194a3398e" # There is another copy of git.exe in MinGit\bin. However, an installed version of git add the cmd dir to the PATH. # Therefore, choosing the cmd dir here as well. - $executableFromDownload = "$downloadsDir\MinGit-2.14.2.3-32-bit\cmd\git.exe" + $executableFromDownload = "$downloadsDir\MinGit-2.14.3-32-bit\cmd\git.exe" $extractionType = $ExtractionType_ZIP - $extractionFolder = "$downloadsDir\MinGit-2.14.2.3-32-bit" + $extractionFolder = "$downloadsDir\MinGit-2.14.3-32-bit" } elseif($Dependency -eq "installerbase") { -- cgit v1.2.3 From eb7e1e481bbebc13d277d6a89f0a270767962286 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 30 Oct 2017 18:51:55 -0700 Subject: Fix proxy usage in Win7 (powershell 2.0) --- scripts/fetchDependency.ps1 | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 89e37c428..6cd28ad8e 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -18,6 +18,19 @@ function Test-Module($moduleName) return [bool](Get-Module -ListAvailable -Name $moduleName) } +function Get-Credential-Backwards-Compatible() +{ + if (Test-CommandParameter -commandName 'Get-Credential' -parameterName 'Message') + { + return Get-Credential -Message "Enter credentials for Proxy Authentication" + } + else + { + Write-Host "Enter credentials for Proxy Authentication" + return Get-Credential + } +} + if (Test-Module -moduleName 'BitsTransfer') { Import-Module BitsTransfer -Verbose:$false @@ -54,28 +67,18 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $WC = New-Object System.Net.WebClient $ProxyAuth = !$WC.Proxy.IsBypassed($url) - if ($ProxyAuth) - { - if (Test-CommandParameter -commandName 'Get-Credential' -parameterName 'Message') - { - $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication" - } - else - { - "Enter credentials for Proxy Authentication" - $ProxyCred = Get-Credential - } - - $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") - $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred) - $WC.Proxy.Credentials=$ProxyCred - } # git and installerbase fail with Start-BitsTransfer if ((Test-Command -commandName 'Start-BitsTransfer') -and ($Dependency -ne "git")-and ($Dependency -ne "installerbase")) { try { + if ($ProxyAuth) + { + $ProxyCred = Get-Credential-Backwards-Compatible + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential", $ProxyCred) + } Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop return } @@ -89,6 +92,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } } + if ($ProxyAuth) + { + $WC.Proxy.Credentials = Get-Credential-Backwards-Compatible + } + Write-Verbose("Downloading $Dependency...") $WC.DownloadFile($url, $downloadPath) } -- cgit v1.2.3 From 7d0bcceaf028f28b0bc5ae666689f26d8de743a9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 31 Oct 2017 17:06:07 -0700 Subject: [findVSInstances] Data lines are now placed within tags. Text outside these tags is ignored This means we can print text in powershell now and it won't break vcpkg. --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 2 +- scripts/findVisualStudioInstallationInstances.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index 3269562dc..d9ffbd32a 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -11,7 +11,7 @@ $VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationI Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstallationInstances))" foreach ($instanceCandidateWithEOL in $VisualStudioInstallationInstances) { - $instanceCandidate = $instanceCandidateWithEOL -replace "::" + $instanceCandidate = $instanceCandidateWithEOL -replace "::" -replace "::" Write-Verbose "Inspecting: $instanceCandidate" $split = $instanceCandidate -split "::" # $preferenceWeight = $split[0] diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 566560cdb..5470b57c0 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -29,7 +29,7 @@ foreach ($instance in $asXml.instances.instance) } # Placed like that for easy sorting according to preference - $results.Add("${releaseType}::${installationVersion}::${installationPath}::") > $null + $results.Add("::${releaseType}::${installationVersion}::${installationPath}::") > $null } # If nothing is found, attempt to find VS2015 Build Tools (not detected by vswhere.exe) @@ -42,7 +42,7 @@ if ($results.Count -eq 0) if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) { - return "PreferenceWeight1::Legacy::14.0::$installationPath::" + return "::PreferenceWeight1::Legacy::14.0::$installationPath::" } } -- cgit v1.2.3 From 47bf4b6b5caf44adeaf582e5137377fb9d2cc5c4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 31 Oct 2017 17:23:09 -0700 Subject: [fetchDependency] Now also returns output in the form data --- scripts/fetchDependency.ps1 | 4 ++-- scripts/findVisualStudioInstallationInstances.ps1 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6cd28ad8e..aec05457a 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -265,6 +265,6 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) return $executableFromDownload } -SelectProgram $Dependency - +$path = SelectProgram $Dependency Write-Verbose "Fetching dependency: $Dependency. Done." +return "::$path::" diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 5470b57c0..e3bc67ff6 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -4,7 +4,7 @@ param( ) $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition -$vswhereExe = & $scriptsDir\fetchDependency.ps1 "vswhere" +$vswhereExe = (& $scriptsDir\fetchDependency.ps1 "vswhere") -replace "::" -replace "::" $output = & $vswhereExe -prerelease -legacy -products * -format xml [xml]$asXml = $output -- cgit v1.2.3 From a5b54588eca1d57366f7052ee9ab30da4ba68066 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 31 Oct 2017 17:30:29 -0700 Subject: [git] Update to 2.15.0 (was 2.14.3) --- scripts/bootstrap.ps1 | 2 +- scripts/fetchDependency.ps1 | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 4488d9b95..f44a7dea1 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -13,7 +13,7 @@ $gitHash = "unknownhash" $oldpath = $env:path try { - $env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.3-32-bit\cmd" + $env:path += ";$vcpkgRootDir\downloads\MinGit-2.15.0-32-bit\cmd" if (Get-Command "git" -ErrorAction SilentlyContinue) { $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index aec05457a..4ef3a1f17 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -180,16 +180,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "git") { - $requiredVersion = "2.14.3" - $downloadVersion = "2.14.3" - $url = "https://github.com/git-for-windows/git/releases/download/v2.14.3.windows.1/MinGit-2.14.3-32-bit.zip" - $downloadPath = "$downloadsDir\MinGit-2.14.3-32-bit.zip" - $expectedDownloadedFileHash = "a91385acb1da220612790807c41d0f304b41093c474b9d7342230ec194a3398e" + $requiredVersion = "2.15.0" + $downloadVersion = "2.15.0" + $url = "https://github.com/git-for-windows/git/releases/download/v2.15.0.windows.1/MinGit-2.15.0-32-bit.zip" + $downloadPath = "$downloadsDir\MinGit-2.15.0-32-bit.zip" + $expectedDownloadedFileHash = "69c035ab7b75c42ce5dd99e8927d2624ab618fab73c5ad84c9412bd74c343537" # There is another copy of git.exe in MinGit\bin. However, an installed version of git add the cmd dir to the PATH. # Therefore, choosing the cmd dir here as well. - $executableFromDownload = "$downloadsDir\MinGit-2.14.3-32-bit\cmd\git.exe" + $executableFromDownload = "$downloadsDir\MinGit-2.15.0-32-bit\cmd\git.exe" $extractionType = $ExtractionType_ZIP - $extractionFolder = "$downloadsDir\MinGit-2.14.3-32-bit" + $extractionFolder = "$downloadsDir\MinGit-2.15.0-32-bit" } elseif($Dependency -eq "installerbase") { -- cgit v1.2.3 From 516c42bdc4a5443e0f78fae559c187823e6326d1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 31 Oct 2017 23:41:24 -0700 Subject: [bootstrap-vcpkg] Added better diagnostics in case of MSBuild failure. --- scripts/bootstrap.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index f44a7dea1..b14dbbe4a 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -32,7 +32,8 @@ $vcpkgSourcesPath = "$vcpkgRootDir\toolsrc" if (!(Test-Path $vcpkgSourcesPath)) { - New-Item -ItemType directory -Path $vcpkgSourcesPath -force | Out-Null + Write-Error "Unable to determine vcpkg sources directory. '$vcpkgSourcesPath' does not exist." + return } try @@ -43,6 +44,11 @@ try $platformToolset = $msbuildExeWithPlatformToolset[1] $windowsSDK = & $scriptsDir\getWindowsSDK.ps1 & $msbuildExe "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /p:PlatformToolset=$platformToolset /p:TargetPlatformVersion=$windowsSDK /m dirs.proj + if ($LASTEXITCODE -ne 0) + { + Write-Error "Building vcpkg.exe failed. Please ensure you have installed the Desktop C++ workload and the Windows SDK for Desktop C++." + return + } Write-Verbose("Placing vcpkg.exe in the correct location") -- cgit v1.2.3 From 4ff90ec4309df1d5937d62c52683e1147066445a Mon Sep 17 00:00:00 2001 From: James Chang Date: Wed, 1 Nov 2017 16:27:12 +0800 Subject: [poco] build with MySQL support (#2088) * [poco] build with MySQL support Set proper variables to enable MySQL support if libmysql port is installed * [poco] Move Mysql support to a feature. Enable CMake config files. --- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 069672b71..ca228b2a4 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -116,6 +116,9 @@ function(vcpkg_fixup_cmake_targets) "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" _contents "${_contents}") + string(REPLACE "${CURRENT_INSTALLED_DIR}" "_INVALID_ROOT_" _contents "${_contents}") + string(REGEX REPLACE ";_INVALID_ROOT_/[^\";]*" "" _contents "${_contents}") + string(REGEX REPLACE "_INVALID_ROOT_/[^\";]*;" "" _contents "${_contents}") file(WRITE ${MAIN_TARGET} "${_contents}") endforeach() -- cgit v1.2.3 From b54f4f26ae6c2b0944590d0de5c7fbf0d9ed38d7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Nov 2017 11:41:51 -0700 Subject: [blaze] Fix remaining stray _INVALID_ROOT_ --- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index ca228b2a4..22c2245c8 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -119,6 +119,7 @@ function(vcpkg_fixup_cmake_targets) string(REPLACE "${CURRENT_INSTALLED_DIR}" "_INVALID_ROOT_" _contents "${_contents}") string(REGEX REPLACE ";_INVALID_ROOT_/[^\";]*" "" _contents "${_contents}") string(REGEX REPLACE "_INVALID_ROOT_/[^\";]*;" "" _contents "${_contents}") + string(REGEX REPLACE "\"_INVALID_ROOT_/[^\";]*\"" "\"\"" _contents "${_contents}") file(WRITE ${MAIN_TARGET} "${_contents}") endforeach() -- cgit v1.2.3 From 24c3f87bf45838aeeb74c513d40ac175994d0b7f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Nov 2017 18:54:10 -0700 Subject: [vcpkg_download_distfile] Now downloads in a temp dir and rename to the target location --- scripts/cmake/vcpkg_download_distfile.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index b8acfc823..ff32f1aed 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -38,7 +38,12 @@ function(vcpkg_download_distfile VAR) set(oneValueArgs FILENAME SHA512) set(multipleValuesArgs URLS) cmake_parse_arguments(vcpkg_download_distfile "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + set(downloaded_file_path ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}) + set(download_file_path_part "${DOWNLOADS}/temp/${vcpkg_download_distfile_FILENAME}") + + file(REMOVE_RECURSE "${DOWNLOADS}/temp") + file(MAKE_DIRECTORY "${DOWNLOADS}/temp") function(test_hash FILE_KIND CUSTOM_ERROR_ADVICE) message(STATUS "Testing integrity of ${FILE_KIND}...") @@ -65,13 +70,13 @@ function(vcpkg_download_distfile VAR) # Tries to download the file. foreach(url IN LISTS vcpkg_download_distfile_URLS) message(STATUS "Downloading ${url}...") - file(DOWNLOAD ${url} ${downloaded_file_path} STATUS download_status) + file(DOWNLOAD ${url} "${download_file_path_part}" STATUS download_status SHOW_PROGRESS) list(GET download_status 0 status_code) if (NOT "${status_code}" STREQUAL "0") message(STATUS "Downloading ${url}... Failed. Status: ${download_status}") - file(REMOVE ${downloaded_file_path}) set(download_success 0) else() + file(RENAME ${download_file_path_part} ${downloaded_file_path}) message(STATUS "Downloading ${url}... OK") set(download_success 1) break() -- cgit v1.2.3 From 9150cb8a906c99ff1881fe0d88811ad967658cde Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Nov 2017 18:54:34 -0700 Subject: [vcpkg_find_acquire_program] Use vcpkg_download_distfile() --- scripts/cmake/vcpkg_find_acquire_program.cmake | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index fdee0cb1f..e6a37e328 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -164,18 +164,20 @@ function(vcpkg_find_acquire_program VAR) do_find() if("${${VAR}}" MATCHES "-NOTFOUND") - file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE} - EXPECTED_HASH SHA512=${HASH} - SHOW_PROGRESS + vcpkg_download_distfile(ARCHIVE_PATH + URLS ${URL} + SHA512 ${HASH} + FILENAME ${ARCHIVE} ) + file(MAKE_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) if(DEFINED NOEXTRACT) - file(COPY ${DOWNLOADS}/${ARCHIVE} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) + file(COPY ${ARCHIVE_PATH} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) else() 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 "${ARCHIVE_PATH}" ARCHIVE_NATIVE_PATH) file(TO_NATIVE_PATH "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}" DESTINATION_NATIVE_PATH) execute_process( COMMAND msiexec /a ${ARCHIVE_NATIVE_PATH} /qn TARGETDIR=${DESTINATION_NATIVE_PATH} @@ -183,7 +185,7 @@ function(vcpkg_find_acquire_program VAR) ) else() execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} + COMMAND ${CMAKE_COMMAND} -E tar xzf ${ARCHIVE_PATH} WORKING_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR} ) endif() -- cgit v1.2.3 From ebb52b8cb19e049cf998bd6742cb9f6a07e947cd Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Nov 2017 19:08:13 -0700 Subject: Remove vcpkg_acquire_depot_tools --- scripts/cmake/vcpkg_acquire_depot_tools.cmake | 48 --------------------------- scripts/cmake/vcpkg_common_functions.cmake | 1 - 2 files changed, 49 deletions(-) delete mode 100644 scripts/cmake/vcpkg_acquire_depot_tools.cmake (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_acquire_depot_tools.cmake b/scripts/cmake/vcpkg_acquire_depot_tools.cmake deleted file mode 100644 index 009ba40f1..000000000 --- a/scripts/cmake/vcpkg_acquire_depot_tools.cmake +++ /dev/null @@ -1,48 +0,0 @@ -function(vcpkg_acquire_depot_tools PATH_TO_ROOT_OUT) - set(TOOLPATH ${DOWNLOADS}/tools/depot_tools) - set(URL "https://storage.googleapis.com/chrome-infra/depot_tools.zip") - set(ARCHIVE "depot_tools.zip") - set(STAMP "initialized-depot-tools.stamp") - set(downloaded_file_path ${DOWNLOADS}/${ARCHIVE}) - - if(NOT EXISTS "${TOOLPATH}/${STAMP}") - - message(STATUS "Acquiring Depot Tools...") - - if(EXISTS ${downloaded_file_path}) - message(STATUS "Using cached ${downloaded_file_path}") - else() - if(_VCPKG_NO_DOWNLOADS) - message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") - endif() - file(DOWNLOAD ${URL} ${downloaded_file_path} STATUS download_status) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - message(STATUS "Downloading ${URL}... Failed. Status: ${download_status}") - file(REMOVE ${downloaded_file_path}) - set(download_success 0) - else() - message(STATUS "Downloading ${URL}... OK") - set(download_success 1) - endif() - - if (NOT download_success) - message(FATAL_ERROR - "\n" - " Failed to download file.\n" - " Add mirrors or submit an issue at https://github.com/Microsoft/vcpkg/issues\n") - endif() - endif() - - - file(REMOVE_RECURSE ${TOOLPATH}) - file(MAKE_DIRECTORY ${TOOLPATH}) - execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} - WORKING_DIRECTORY ${TOOLPATH} - ) - file(WRITE "${TOOLPATH}/${STAMP}" "0") - message(STATUS "Acquiring Depot Tools... OK") - endif() - set(${PATH_TO_ROOT_OUT} ${TOOLPATH} PARENT_SCOPE) -endfunction() diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 81e8e5813..7ef87f2ea 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -21,4 +21,3 @@ include(vcpkg_copy_tool_dependencies) include(vcpkg_get_program_files_32_bit) include(vcpkg_get_program_files_platform_bitness) include(vcpkg_get_windows_sdk) -include(vcpkg_acquire_depot_tools) -- cgit v1.2.3 From dc7db2571399a97d6dacc4f12f81ee1fa204987d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Nov 2017 19:08:53 -0700 Subject: [downloads] Don't show progress by default --- scripts/cmake/vcpkg_download_distfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index ff32f1aed..0141e9811 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -70,7 +70,7 @@ function(vcpkg_download_distfile VAR) # Tries to download the file. foreach(url IN LISTS vcpkg_download_distfile_URLS) message(STATUS "Downloading ${url}...") - file(DOWNLOAD ${url} "${download_file_path_part}" STATUS download_status SHOW_PROGRESS) + file(DOWNLOAD ${url} "${download_file_path_part}" STATUS download_status) list(GET download_status 0 status_code) if (NOT "${status_code}" STREQUAL "0") message(STATUS "Downloading ${url}... Failed. Status: ${download_status}") -- cgit v1.2.3 From 76d4666f12cbce4a52123cc41d489dfa4ce4bbba Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Nov 2017 19:14:10 -0700 Subject: [vcpkg_acquire_msys] Use vcpkg_download_distfile() --- scripts/cmake/vcpkg_acquire_msys.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index 830022906..80a30bf2b 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -70,14 +70,18 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) set(PATH_TO_ROOT ${TOOLPATH}/${TOOLSUBPATH}) if(NOT EXISTS "${TOOLPATH}/${STAMP}") + message(STATUS "Acquiring MSYS2...") - file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE} - EXPECTED_HASH SHA512=${HASH} + vcpkg_download_distfile(ARCHIVE_PATH + URLS ${URL} + FILENAME ${ARCHIVE} + SHA512 ${HASH} ) + file(REMOVE_RECURSE ${TOOLPATH}/${TOOLSUBPATH}) file(MAKE_DIRECTORY ${TOOLPATH}) execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} + COMMAND ${CMAKE_COMMAND} -E tar xzf ${ARCHIVE_PATH} WORKING_DIRECTORY ${TOOLPATH} ) execute_process( -- cgit v1.2.3 From 8bbd043beac822c20c54e6f2ee686777c9a20ac9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 14:34:08 -0700 Subject: vcpkg_from_github] Use vcpkg_download_distfile() --- scripts/cmake/vcpkg_download_distfile.cmake | 4 ++++ scripts/cmake/vcpkg_from_github.cmake | 33 ++++++++++++----------------- 2 files changed, 17 insertions(+), 20 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 0141e9811..b22d82a16 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -46,6 +46,10 @@ function(vcpkg_download_distfile VAR) file(MAKE_DIRECTORY "${DOWNLOADS}/temp") function(test_hash FILE_KIND CUSTOM_ERROR_ADVICE) + if (_VCPKG_INTERNAL_NO_HASH_CHECK) + return() + endif() + message(STATUS "Testing integrity of ${FILE_KIND}...") file(SHA512 ${downloaded_file_path} FILE_HASH) if(NOT "${FILE_HASH}" STREQUAL "${vcpkg_download_distfile_SHA512}") diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index d14077410..1ede43fd8 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -113,7 +113,8 @@ function(vcpkg_from_github) # The following is for --head scenarios set(URL "https://github.com/${ORG_NAME}/${REPO_NAME}/archive/${_vdud_HEAD_REF}.tar.gz") - set(downloaded_file_path "${DOWNLOADS}/${ORG_NAME}-${REPO_NAME}-${_vdud_HEAD_REF}.tar.gz") + set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${_vdud_HEAD_REF}.tar.gz") + set(downloaded_file_path "${DOWNLOADS}/${downloaded_file_name}") if(_VCPKG_NO_DOWNLOADS) if(NOT EXISTS ${downloaded_file_path} OR NOT EXISTS ${downloaded_file_path}.version) @@ -133,35 +134,27 @@ function(vcpkg_from_github) endif() # Try to download the file and version information from github. - message(STATUS "Downloading ${URL}...") - file(DOWNLOAD "https://api.github.com/repos/${ORG_NAME}/${REPO_NAME}/git/refs/heads/${_vdud_HEAD_REF}" - ${downloaded_file_path}.version - STATUS download_status + set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE") + vcpkg_download_distfile(ARCHIVE_VERSION + URLS "https://api.github.com/repos/${ORG_NAME}/${REPO_NAME}/git/refs/heads/${_vdud_HEAD_REF}" + FILENAME ${downloaded_file_name}.version ) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - file(REMOVE ${downloaded_file_path}.version) - message(FATAL_ERROR "Downloading version info for ${URL}... Failed. Status: ${download_status}") - endif() - file(DOWNLOAD ${URL} ${downloaded_file_path} STATUS download_status) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - file(REMOVE ${downloaded_file_path}) - message(FATAL_ERROR "Downloading ${URL}... Failed. Status: ${download_status}") - else() - message(STATUS "Downloading ${URL}... OK") - endif() + vcpkg_download_distfile(ARCHIVE + URLS ${URL} + FILENAME ${downloaded_file_name} + ) + set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE") endif() vcpkg_extract_source_archive_ex( - ARCHIVE "${downloaded_file_path}" + ARCHIVE "${ARCHIVE}" WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/head" ) # Parse the github refs response with regex. # TODO: use some JSON swiss-army-knife utility instead. - file(READ "${downloaded_file_path}.version" _contents) + file(READ "${ARCHIVE_VERSION}" _contents) string(REGEX MATCH "\"sha\": \"[a-f0-9]+\"" x "${_contents}") string(REGEX REPLACE "\"sha\": \"([a-f0-9]+)\"" "\\1" _version ${x}) -- cgit v1.2.3 From a523aacff8a642d4380e5f53b87404118b5d2a03 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 14:50:16 -0700 Subject: [vcpkg_from_bitbucket] Use vcpkg_download_distfile() --- scripts/cmake/vcpkg_from_bitbucket.cmake | 38 +++++++++++++------------------- 1 file changed, 15 insertions(+), 23 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_from_bitbucket.cmake b/scripts/cmake/vcpkg_from_bitbucket.cmake index 227de5141..26600f013 100644 --- a/scripts/cmake/vcpkg_from_bitbucket.cmake +++ b/scripts/cmake/vcpkg_from_bitbucket.cmake @@ -92,13 +92,13 @@ function(vcpkg_from_bitbucket) message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") set(VCPKG_USE_HEAD_VERSION OFF) endif() - + # Handle --no-head scenarios if(NOT VCPKG_USE_HEAD_VERSION) if(NOT _vdud_REF) message(FATAL_ERROR "Package does not specify REF. It must built using --head.") endif() - + set(URL "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_REF}.tar.gz") set(downloaded_file_path "${DOWNLOADS}/${ORG_NAME}-${REPO_NAME}-${_vdud_REF}.tar.gz") @@ -117,7 +117,7 @@ function(vcpkg_from_bitbucket) else() set(_version ${_vdud_REF}) endif() - + vcpkg_download_distfile(ARCHIVE URLS "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_REF}.tar.gz" SHA512 "${_vdud_SHA512}" @@ -150,39 +150,31 @@ function(vcpkg_from_bitbucket) endif() # Try to download the file and version information from bitbucket. - message(STATUS "Downloading ${URL}...") - file(DOWNLOAD "https://api.bitbucket.com/2.0/repositories/${ORG_NAME}/${REPO_NAME}/refs/branches/${_vdud_HEAD_REF}" - ${downloaded_file_path}.version - STATUS download_status + set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE") + vcpkg_download_distfile(ARCHIVE_VERSION + URLS "https://api.bitbucket.com/2.0/repositories/${ORG_NAME}/${REPO_NAME}/refs/branches/${_vdud_HEAD_REF}" + FILENAME ${downloaded_file_name}.version ) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - file(REMOVE ${downloaded_file_path}.version) - message(FATAL_ERROR "Downloading version info for ${URL}... Failed. Status: ${download_status}") - endif() - file(DOWNLOAD ${URL} ${downloaded_file_path} STATUS download_status) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - file(REMOVE ${downloaded_file_path}) - message(FATAL_ERROR "Downloading ${URL}... Failed. Status: ${download_status}") - else() - message(STATUS "Downloading ${URL}... OK") - endif() + vcpkg_download_distfile(ARCHIVE + URLS ${URL} + FILENAME ${downloaded_file_name} + ) + set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE") endif() vcpkg_extract_source_archive_ex( - ARCHIVE "${downloaded_file_path}" + ARCHIVE "${ARCHIVE}" WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/head" ) # Parse the github refs response with regex. # TODO: use some JSON swiss-army-knife utility instead. - file(READ "${downloaded_file_path}.version" _contents) + file(READ "${ARCHIVE_VERSION}" _contents) string(REGEX MATCH "\"hash\": \"[a-f0-9]+\"" x "${_contents}") string(REGEX REPLACE "\"hash\": \"([a-f0-9]+)\"" "\\1" _version ${x}) string(SUBSTRING ${_version} 0 12 _vdud_HEAD_REF) # Get the 12 first numbers from commit hash - + # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) -- cgit v1.2.3 From 0fb0191f3cb9ba4ea0f0e0675f929e1e599e1461 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 14:52:02 -0700 Subject: [ports.cmake] Use vcpkg_download_distfile() --- scripts/ports.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/ports.cmake b/scripts/ports.cmake index 8b4d17d80..ef06a4d65 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -108,10 +108,12 @@ elseif(CMD MATCHES "^CREATE$") message(STATUS "If this is not desired, delete the file and ${NATIVE_VCPKG_ROOT_DIR}\\ports\\${PORT}") else() include(vcpkg_download_distfile) - file(DOWNLOAD ${URL} ${DOWNLOADS}/${FILENAME} STATUS error_code) - if(NOT error_code MATCHES "0;") - message(FATAL_ERROR "Error downloading file: ${error_code}") - endif() + set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE") + vcpkg_download_distfile(ARCHIVE + URLS ${URL} + FILENAME ${FILENAME} + ) + set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE") endif() file(SHA512 ${DOWNLOADS}/${FILENAME} SHA512) -- cgit v1.2.3 From 82ce87cfd0854907a270ef2f8de80670bd8428b3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 15:48:21 -0700 Subject: Use download-at-temp-and-rename pattern in powershell too --- scripts/fetchDependency.ps1 | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 4ef3a1f17..9d3f76386 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -65,6 +65,18 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) New-Item -ItemType directory -Path $downloadDir | Out-Null } + $downloadsTemp = "$downloadDir/temp" + if (Test-Path $downloadsTemp) # Delete temp dir if it exists + { + Remove-Item $downloadsTemp -Recurse -Force + } + if (!(Test-Path $downloadsTemp)) # Recreate temp dir. It may still be there the dir was in use + { + New-Item -ItemType directory -Path $downloadsTemp | Out-Null + } + + $tempDownloadName = "$downloadsTemp/$Dependency-$downloadVersion.temp" + $WC = New-Object System.Net.WebClient $ProxyAuth = !$WC.Proxy.IsBypassed($url) @@ -79,15 +91,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential", $ProxyCred) } - Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop + Start-BitsTransfer -Source $url -Destination $tempDownloadName -ErrorAction Stop + Move-Item -Path $tempDownloadName -Destination $downloadPath return } catch [System.Exception] { # If BITS fails for any reason, delete any potentially partially downloaded files and continue - if (Test-Path $downloadPath) + if (Test-Path $tempDownloadName) { - Remove-Item $downloadPath + Remove-Item $tempDownloadName } } } @@ -98,7 +111,8 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } Write-Verbose("Downloading $Dependency...") - $WC.DownloadFile($url, $downloadPath) + $WC.DownloadFile($url, $tempDownloadName) + Move-Item -Path $tempDownloadName -Destination $downloadPath } # Enums (without resorting to C#) are only available on powershell 5+. -- cgit v1.2.3 From 9dc02f48b65618ab7f89c5a004a3d81fc882af32 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 16:35:15 -0700 Subject: [fetchDependendy.ps1] Remove obsolete comment --- scripts/fetchDependency.ps1 | 3 --- 1 file changed, 3 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 9d3f76386..6788b5e7e 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -57,9 +57,6 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) return } - # Can't print because vcpkg captures the output and expects only the path that is returned at the end of this script file - # Write-Host "A suitable version of $Dependency was not found (required v$requiredVersion). Downloading portable $Dependency v$downloadVersion..." - if (!(Test-Path $downloadDir)) { New-Item -ItemType directory -Path $downloadDir | Out-Null -- cgit v1.2.3 From a4dc2d2ef29654df9587d60f586c2eea16dedaaf Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 16:39:43 -0700 Subject: [fetchDependency.ps1] Improve error message on hash mismatch --- scripts/fetchDependency.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6788b5e7e..593cba2a6 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -239,9 +239,14 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $downloadedFileHash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_}) } + $downloadedFileHash = $downloadedFileHash.ToLower() if ($expectedDownloadedFileHash -ne $downloadedFileHash) { - throw [System.IO.FileNotFoundException] ("Mismatching hash of the downloaded " + $Dependency) + Write-Host ("`nFile does not have expected hash:`n" + + " File path: [ $downloadPath ]`n" + + " Expected hash: [ $expectedDownloadedFileHash ]`n" + + " Actual hash: [ $downloadedFileHash ]`n") + throw "Invalid Hash" } if ($extractionType -eq $ExtractionType_NO_EXTRACTION_REQUIRED) @@ -270,7 +275,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if (-not (Test-Path $executableFromDownload)) { - throw [System.IO.FileNotFoundException] ("Could not detect or download " + $Dependency) + throw ("Could not detect or download " + $Dependency) } return $executableFromDownload -- cgit v1.2.3 From ad884fc2966c0d8fdff6835d481fd301bfc438ad Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 16:40:28 -0700 Subject: [vswhere] Update to 2.2.11 (was 2.2.7) --- scripts/fetchDependency.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 593cba2a6..f78d159d0 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -181,11 +181,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "vswhere") { - $requiredVersion = "2.2.7" - $downloadVersion = "2.2.7" - $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.7/vswhere.exe" + $requiredVersion = "2.2.11" + $downloadVersion = "2.2.11" + $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.11/vswhere.exe" $downloadPath = "$downloadsDir\vswhere-$downloadVersion\vswhere.exe" - $expectedDownloadedFileHash = "f50303881da706132516d9decfd5314d524a0044daf49c0cfd21dc39c1261ec3" + $expectedDownloadedFileHash = "0235c2cb6341978abdf32e27fcf1d7af5cb5514c035e529c4cd9283e6f1a261f" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } -- cgit v1.2.3 From 3b90bc07ce6fb8639fbb0a142bdbbd458e85462a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 18:25:54 -0700 Subject: [cmake] Update to 3.9.5 (was 3.9.4) --- scripts/fetchDependency.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index f78d159d0..16ba984e6 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -160,12 +160,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if($Dependency -eq "cmake") { - $requiredVersion = "3.9.4" - $downloadVersion = "3.9.4" - $url = "https://cmake.org/files/v3.9/cmake-3.9.4-win32-x86.zip" - $downloadPath = "$downloadsDir\cmake-3.9.4-win32-x86.zip" - $expectedDownloadedFileHash = "8214df1ff51f9a6a1f0e27f9bd18f402b1749c5b645fbf6e401bcb00047171cd" - $executableFromDownload = "$downloadsDir\cmake-3.9.4-win32-x86\bin\cmake.exe" + $requiredVersion = "3.9.5" + $downloadVersion = "3.9.5" + $url = "https://cmake.org/files/v3.9/cmake-3.9.5-win32-x86.zip" + $downloadPath = "$downloadsDir\cmake-3.9.5-win32-x86.zip" + $expectedDownloadedFileHash = "dd3e183254c12f7c338d3edfa642f1ac84a763b8b9a2feabb4ad5fccece5dff9" + $executableFromDownload = "$downloadsDir\cmake-3.9.5-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP $extractionFolder = $downloadsDir } -- cgit v1.2.3 From 330b8d8bab6a3d07165bf7c05fea09a8e0d56348 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 4 Nov 2017 20:48:06 -0700 Subject: [vcpkg-msbuild-integration] Output warning when configuration is not determinable. Add special cases for RelWithDebInfo and MinSizeRel. --- scripts/buildsystems/msbuild/vcpkg.targets | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index 1cb338237..ad1dde89b 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -36,15 +36,17 @@ $(Configuration) + Debug + Release $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), .vcpkg-root))\installed\$(VcpkgTriplet)\ - %(AdditionalDependencies);$(VcpkgRoot)debug\lib\*.lib - %(AdditionalDependencies);$(VcpkgRoot)lib\*.lib - %(AdditionalLibraryDirectories);$(VcpkgRoot)lib;$(VcpkgRoot)lib\manual-link - %(AdditionalLibraryDirectories);$(VcpkgRoot)debug\lib;$(VcpkgRoot)debug\lib\manual-link + %(AdditionalDependencies);$(VcpkgRoot)debug\lib\*.lib + %(AdditionalDependencies);$(VcpkgRoot)lib\*.lib + %(AdditionalLibraryDirectories);$(VcpkgRoot)lib;$(VcpkgRoot)lib\manual-link + %(AdditionalLibraryDirectories);$(VcpkgRoot)debug\lib;$(VcpkgRoot)debug\lib\manual-link %(AdditionalIncludeDirectories);$(VcpkgRoot)include @@ -57,6 +59,7 @@ + -- cgit v1.2.3