diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-10-27 18:21:15 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-06 07:39:33 +0200 |
commit | 33eb8101a25d41b9a19bdad45d109e55e0aa7ee2 (patch) | |
tree | d5d02ea8cb5cbf2a00dde0e8459b8537fc0e52bf /src | |
parent | 0f3b3c10d63140509ebcd466b281a78e7f745225 (diff) |
Add more include paths for msvc
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index a295eba..1265d3d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -300,6 +300,8 @@ struct MicrosoftBuildTool char umIncludePath[_TINYDIR_PATH_MAX]; // empty if not found char ucrtIncludePath[_TINYDIR_PATH_MAX]; + // empty if not found + char sharedIncludePath[_TINYDIR_PATH_MAX]; bool found() { @@ -314,7 +316,7 @@ static MicrosoftBuildTool locateLatestMicrosoftBuildTool() if (execResult && execResult.unwrap().exitCode == 0) { auto &str = execResult.unwrap().execStdout; - sscanf(execResult.unwrap().execStdout.c_str(), "%d %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n]", + sscanf(execResult.unwrap().execStdout.c_str(), "%d %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n]", &result.version, result.binPath, result.vsLibPath, @@ -322,7 +324,8 @@ static MicrosoftBuildTool locateLatestMicrosoftBuildTool() result.ucrtLibPath, result.vsIncludePath, result.umIncludePath, - result.ucrtIncludePath); + result.ucrtIncludePath, + result.sharedIncludePath); } return result; } @@ -341,7 +344,7 @@ static void appendMicrosoftBuildToolToPathEnv() fprintf(stderr, "Warning: Failed to add microsoft build tools to PATH env\n"); } - if (_putenv_s("INCLUDE", join({ msBuildTool.vsIncludePath, msBuildTool.umIncludePath, msBuildTool.ucrtIncludePath }, ';')) != 0) + if (_putenv_s("INCLUDE", join({ msBuildTool.vsIncludePath, msBuildTool.umIncludePath, msBuildTool.ucrtIncludePath, msBuildTool.sharedIncludePath }, ';')) != 0) fprintf(stderr, "Warning: Failed to add microsoft build libraries to INCLUDE env\n"); if (_putenv_s("LIB", join({ msBuildTool.vsLibPath, msBuildTool.umLibPath, msBuildTool.ucrtLibPath }, ';')) != 0) |