mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 19:17:10 +01:00
[vcpkg] Place VS user-wide integration into a C++ specific folder instead of for all projects.
This avoids a bug where the IDE would erroneously add x86, x64, and ARM architectures to C# projects.
This commit is contained in:
parent
7f310150d6
commit
81d6426298
@ -6,6 +6,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
|
#include <array>
|
||||||
#include "vcpkg_Environment.h"
|
#include "vcpkg_Environment.h"
|
||||||
#include "vcpkg_Checks.h"
|
#include "vcpkg_Checks.h"
|
||||||
#include "vcpkg_System.h"
|
#include "vcpkg_System.h"
|
||||||
@ -13,8 +14,11 @@
|
|||||||
|
|
||||||
namespace vcpkg
|
namespace vcpkg
|
||||||
{
|
{
|
||||||
static const fs::path old_system_wide_targets_file = "C:/Program Files (x86)/MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets";
|
static const std::array<fs::path, 2> old_system_target_files = {
|
||||||
static const fs::path system_wide_targets_file = "C:/Program Files (x86)/MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets";
|
"C:/Program Files (x86)/MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets",
|
||||||
|
"C:/Program Files (x86)/MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets"
|
||||||
|
};
|
||||||
|
static const fs::path system_wide_targets_file = "C:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props";
|
||||||
|
|
||||||
static std::string create_appdata_targets_shortcut(const std::string& target_path) noexcept
|
static std::string create_appdata_targets_shortcut(const std::string& target_path) noexcept
|
||||||
{
|
{
|
||||||
@ -145,6 +149,7 @@ namespace vcpkg
|
|||||||
static void integrate_install(const vcpkg_paths& paths)
|
static void integrate_install(const vcpkg_paths& paths)
|
||||||
{
|
{
|
||||||
// TODO: This block of code should eventually be removed
|
// TODO: This block of code should eventually be removed
|
||||||
|
for (auto&& old_system_wide_targets_file : old_system_target_files)
|
||||||
{
|
{
|
||||||
if (fs::exists(old_system_wide_targets_file))
|
if (fs::exists(old_system_wide_targets_file))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user