From 5b01ec2f43712b7f83a83ff4ea582b29e08f39db Mon Sep 17 00:00:00 2001 From: Emily Mabrey Date: Tue, 28 Sep 2021 13:30:25 -0400 Subject: [PATCH 1/3] Update vcpkg submodule Now includes most recent microsoft/vcpkg changes from master Signed-off-by: Emily Mabrey --- vcpkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcpkg b/vcpkg index dd587d4de..6a504e14a 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit dd587d4de0ad718cab6bdcdb5e34e26d5e31495c +Subproject commit 6a504e14ac379e05894989bf0dcae4bcd6261d91 From 4ef309ae2a3123f315922b70487812f73059dbc8 Mon Sep 17 00:00:00 2001 From: Emily Mabrey Date: Tue, 28 Sep 2021 15:25:24 -0400 Subject: [PATCH 2/3] Update NuGet python version Python version updated from 3.7.7 to 3.9.7 for Windows Nuget downloads Signed-off-by: Emily Mabrey --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ea797684..f4985a0a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -699,7 +699,7 @@ if( Python3_FOUND ) set( PYTHON "${Python3_EXECUTABLE}" ) elseif( CMAKE_SYSTEM_NAME MATCHES "Windows" ) # This is an odd case now, as Conan requires Python as well - nuget_package( pkgdir "python3" "3.7.7" ) + nuget_package( pkgdir "python3" "3.9.7" ) file( TO_NATIVE_PATH "${pkgdir}/tools/python.exe" PYTHON ) endif() From c144b411d474d16c6a7f9615c88f1380de41e752 Mon Sep 17 00:00:00 2001 From: Emily Mabrey Date: Tue, 28 Sep 2021 15:27:29 -0400 Subject: [PATCH 3/3] Use vcpkg nuget for python package Add ability to use vcpkg nuget to install python 3 package This will help us move away from using the `nuget_package` function later Signed-off-by: Emily Mabrey --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f4985a0a9..ae18c85d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -697,8 +697,12 @@ endif() find_package( Python3 ) if( Python3_FOUND ) set( PYTHON "${Python3_EXECUTABLE}" ) +elseif( DEFINED NUGET_EXECUTABLE AND EXISTS "${NUGET_EXECUTABLE}" ) + message( STATUS "Finding vcpkg nuget python" ) + execute_process( COMMAND "${NUGET_EXECUTABLE}" install python -Version 3.9.7 -OutputDirectory "${CMAKE_BINARY_DIR}/packages/" ) + file( TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/packages/python.3.9.7/tools/python.exe" PYTHON ) elseif( CMAKE_SYSTEM_NAME MATCHES "Windows" ) - # This is an odd case now, as Conan requires Python as well + # This is defined in AudacityFunctions; maybe we can remove it by simply relying on vcpkg nuget? nuget_package( pkgdir "python3" "3.9.7" ) file( TO_NATIVE_PATH "${pkgdir}/tools/python.exe" PYTHON ) endif()