mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 06:09:00 +08:00
[boost][python3] Fix building with VS 2019
This commit is contained in:
parent
fd56ffcf5c
commit
660745956a
@ -1,5 +1,5 @@
|
||||
# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
|
||||
Source: boost-iostreams
|
||||
Version: 1.68.0
|
||||
Build-Depends: boost-assert, boost-bind, boost-build, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-preprocessor, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, bzip2, liblzma, zlib
|
||||
Build-Depends: boost-assert, boost-bind, boost-build, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-mpl, boost-preprocessor, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, bzip2, liblzma, zlib
|
||||
Description: Boost iostreams module
|
||||
|
@ -1,2 +1,2 @@
|
||||
Source: boost-modular-build-helper
|
||||
Version: 2018-10-19
|
||||
Version: 2019-01-25
|
||||
|
@ -228,7 +228,7 @@ function(boost_modular_build)
|
||||
file(TO_CMAKE_PATH "${_bm_DIR}/nothing.bat" NOTHING_BAT)
|
||||
set(TOOLSET_OPTIONS " <cxxflags>/EHsc <compileflags>-Zm800 <compileflags>-nologo")
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
if(VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
if(NOT VCPKG_PLATFORM_TOOLSET MATCHES "v140")
|
||||
find_path(PATH_TO_CL cl.exe)
|
||||
find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "${PATH_TO_CL}/../../../lib/x86/store/references" NO_DEFAULT_PATH)
|
||||
if(PLATFORM_WINMD_DIR MATCHES "NOTFOUND")
|
||||
@ -251,7 +251,7 @@ function(boost_modular_build)
|
||||
configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY)
|
||||
configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY)
|
||||
|
||||
if(VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
if(VCPKG_PLATFORM_TOOLSET MATCHES "v141" OR VCPKG_PLATFORM_TOOLSET MATCHES "v142")
|
||||
list(APPEND _bm_OPTIONS toolset=msvc-14.1)
|
||||
elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140")
|
||||
list(APPEND _bm_OPTIONS toolset=msvc-14.0)
|
||||
@ -342,6 +342,7 @@ function(boost_modular_build)
|
||||
string(REPLACE "libboost_" "boost_" NEW_FILENAME ${OLD_FILENAME})
|
||||
string(REPLACE "-s-" "-" NEW_FILENAME ${NEW_FILENAME}) # For Release libs
|
||||
string(REPLACE "-vc141-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2017 and VS2015 binaries
|
||||
string(REPLACE "-vc142-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2019 and VS2015 binaries
|
||||
string(REPLACE "-sgd-" "-gd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs
|
||||
string(REPLACE "-sgyd-" "-gyd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs
|
||||
string(REPLACE "-x32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries
|
||||
|
@ -1,3 +1,3 @@
|
||||
Source: python3
|
||||
Version: 3.6.4-2
|
||||
Version: 3.6.4-3
|
||||
Description: The Python programming language as an embeddable library
|
@ -0,0 +1,13 @@
|
||||
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
|
||||
index 0f01852..6e63711 100644
|
||||
--- a/PCbuild/pythoncore.vcxproj
|
||||
+++ b/PCbuild/pythoncore.vcxproj
|
||||
@@ -71,7 +71,7 @@
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(PySourcePath)PC\external\$(PlatformToolset)\$(ArchName)</AdditionalLibraryDirectories>
|
||||
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(PySourcePath)PC\external\v140\$(ArchName)</AdditionalLibraryDirectories>
|
||||
<BaseAddress>0x1e000000</BaseAddress>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
17
ports/python3/dev16.patch
Normal file
17
ports/python3/dev16.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props
|
||||
index 9a096bc..0647cf8 100644
|
||||
--- a/PCbuild/pyproject.props
|
||||
+++ b/PCbuild/pyproject.props
|
||||
@@ -94,9 +94,9 @@
|
||||
Inputs="$(PySourcePath)Include\patchlevel.h"
|
||||
Outputs="$(IntDir)pythonnt_rc.h">
|
||||
<WriteLinesToFile File="$(IntDir)pythonnt_rc.h" Overwrite="true" Encoding="ascii"
|
||||
- Lines='/* This file created by pyproject.props /t:GeneratePythonNtRcH */
|
||||
-#define FIELD3 $(Field3Value)
|
||||
-#define MS_DLL_ID "$(SysWinVer)"
|
||||
+ Lines='/* This file created by pyproject.props /t:GeneratePythonNtRcH */;
|
||||
+#define FIELD3 $(Field3Value);
|
||||
+#define MS_DLL_ID "$(SysWinVer)";
|
||||
#define PYTHON_DLL_NAME "$(TargetName)$(TargetExt)"
|
||||
' />
|
||||
<ItemGroup>
|
@ -19,6 +19,8 @@ vcpkg_from_github(
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/0004-Fix-iomodule-for-RS4-SDK.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0005-Fix-DefaultWindowsSDKVersion.patch
|
||||
dev16.patch
|
||||
Microsoft.VisualStudio.Setup.Configuration.Native.patch
|
||||
)
|
||||
|
||||
# We need per-triplet directories because we need to patch the project files differently based on the linkage
|
||||
|
@ -27,6 +27,11 @@ function(vcpkg_test_cmake)
|
||||
set(PACKAGE_TYPE CONFIG)
|
||||
endif()
|
||||
|
||||
if(VCPKG_PLATFORM_TOOLSET STREQUAL "v142")
|
||||
message(STATUS "Skipping CMake integration test due to v142 / CMake interaction issues")
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS "Performing CMake integration test")
|
||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test)
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test)
|
||||
|
@ -12,6 +12,7 @@ namespace vcpkg::VisualStudio
|
||||
static constexpr CStringView V_120 = "v120";
|
||||
static constexpr CStringView V_140 = "v140";
|
||||
static constexpr CStringView V_141 = "v141";
|
||||
static constexpr CStringView V_142 = "v142";
|
||||
|
||||
struct VisualStudioInstance
|
||||
{
|
||||
@ -213,35 +214,62 @@ namespace vcpkg::VisualStudio
|
||||
|
||||
for (const fs::path& subdir : msvc_subdirectories)
|
||||
{
|
||||
auto toolset_version_full = subdir.filename().u8string();
|
||||
auto toolset_version_prefix = toolset_version_full.substr(0, 4);
|
||||
CStringView toolset_version;
|
||||
std::string vcvars_option;
|
||||
if (toolset_version_prefix.size() != 4)
|
||||
{
|
||||
// unknown toolset
|
||||
continue;
|
||||
}
|
||||
else if (toolset_version_prefix[3] == '1')
|
||||
{
|
||||
toolset_version = V_141;
|
||||
vcvars_option = "-vcvars_ver=14.1";
|
||||
}
|
||||
else if (toolset_version_prefix[3] == '2')
|
||||
{
|
||||
toolset_version = V_142;
|
||||
vcvars_option = "-vcvars_ver=14.2";
|
||||
}
|
||||
else
|
||||
{
|
||||
// unknown toolset minor version
|
||||
continue;
|
||||
}
|
||||
const fs::path dumpbin_path = subdir / "bin" / "HostX86" / "x86" / "dumpbin.exe";
|
||||
paths_examined.push_back(dumpbin_path);
|
||||
if (fs.exists(dumpbin_path))
|
||||
{
|
||||
const Toolset v141_toolset{
|
||||
vs_instance.root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures};
|
||||
Toolset toolset{vs_instance.root_path,
|
||||
dumpbin_path,
|
||||
vcvarsall_bat,
|
||||
{vcvars_option},
|
||||
toolset_version,
|
||||
supported_architectures};
|
||||
|
||||
const auto english_language_pack = dumpbin_path.parent_path() / "1033";
|
||||
|
||||
if (!fs.exists(english_language_pack))
|
||||
{
|
||||
excluded_toolsets.push_back(v141_toolset);
|
||||
break;
|
||||
excluded_toolsets.push_back(std::move(toolset));
|
||||
continue;
|
||||
}
|
||||
|
||||
found_toolsets.push_back(v141_toolset);
|
||||
found_toolsets.push_back(std::move(toolset));
|
||||
|
||||
if (v140_is_available)
|
||||
{
|
||||
const Toolset v140_toolset{vs_instance.root_path,
|
||||
dumpbin_path,
|
||||
vcvarsall_bat,
|
||||
{"-vcvars_ver=14.0"},
|
||||
V_140,
|
||||
supported_architectures};
|
||||
found_toolsets.push_back(v140_toolset);
|
||||
found_toolsets.push_back({vs_instance.root_path,
|
||||
dumpbin_path,
|
||||
vcvarsall_bat,
|
||||
{"-vcvars_ver=14.0"},
|
||||
V_140,
|
||||
supported_architectures});
|
||||
}
|
||||
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user