aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLily <47812810+LilyWangL@users.noreply.github.com>2020-03-24 02:56:44 +0800
committerGitHub <noreply@github.com>2020-03-23 11:56:44 -0700
commit2d9a32b46fc82d50aa7714a1a4bedc8f0d153dcc (patch)
treeaa89ac3b859f5dbe7fe373f4b040c95027389330
parent97302ca1729eac9917c8a8977667601453795c90 (diff)
downloadvcpkg-2d9a32b46fc82d50aa7714a1a4bedc8f0d153dcc.tar.gz
vcpkg-2d9a32b46fc82d50aa7714a1a4bedc8f0d153dcc.zip
[skia] Fix vswhere.exe can't find VS2017 with -sort (#10437)
* [skia] Fix vswhere.exe can't find VS2017 * [skia] Use $ENV{VCINSTALLDIR}
-rw-r--r--ports/skia/CONTROL2
-rw-r--r--ports/skia/portfile.cmake20
2 files changed, 3 insertions, 19 deletions
diff --git a/ports/skia/CONTROL b/ports/skia/CONTROL
index ed2abe472..f7ccc5ac4 100644
--- a/ports/skia/CONTROL
+++ b/ports/skia/CONTROL
@@ -1,5 +1,5 @@
Source: skia
-Version: 2020-02-15
+Version: 2020-02-15-1
Homepage: https://skia.org
Description: Skia is an open source 2D graphics library which provides common APIs that work across a variety of hardware and software platforms.
It serves as the graphics engine for Google Chrome and Chrome OS, Android, Mozilla Firefox and Firefox OS, and many other products.
diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake
index 66b140d08..c7a5eb263 100644
--- a/ports/skia/portfile.cmake
+++ b/ports/skia/portfile.cmake
@@ -51,22 +51,6 @@ endif()
set(OPTIONS_REL "${OPTIONS} is_official_build=true")
set(OPTIONS_DBG "${OPTIONS} is_debug=true")
-function(find_msvc_path PATH)
- vcpkg_get_program_files_32_bit(PROGRAM_FILES)
- file(TO_CMAKE_PATH "${PROGRAM_FILES}" PROGRAM_FILES)
- set(VSWHERE "${PROGRAM_FILES}/Microsoft Visual Studio/Installer/vswhere.exe")
- execute_process(
- COMMAND "${VSWHERE}" -prerelease -legacy -products * -sort -utf8 -property installationPath
- WORKING_DIRECTORY "${SOURCE_PATH}"
- OUTPUT_VARIABLE OUTPUT_
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- string(REGEX REPLACE "\n|(\r\n)" ";" OUTPUT_ "${OUTPUT_}")
- list(GET OUTPUT_ 0 OUTPUT_)
-
- set(${PATH} "${OUTPUT_}" PARENT_SCOPE)
-endfunction()
-
if(CMAKE_HOST_WIN32)
# Load toolchains
if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
@@ -95,8 +79,8 @@ if(CMAKE_HOST_WIN32)
set(OPTIONS_REL "${OPTIONS_REL} extra_cflags_c=${SKIA_C_FLAGS_REL} \
extra_cflags_cc=${SKIA_CXX_FLAGS_REL}")
- find_msvc_path(WIN_VC)
- set(WIN_VC "${WIN_VC}\\VC")
+ set(WIN_VC "$ENV{VCINSTALLDIR}")
+ string(REPLACE "\\VC\\" "\\VC" WIN_VC "${WIN_VC}")
set(OPTIONS_DBG "${OPTIONS_DBG} win_vc=\"${WIN_VC}\"")
set(OPTIONS_REL "${OPTIONS_REL} win_vc=\"${WIN_VC}\"")