mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 20:01:39 +08:00
eea00aaa91
* upgrade the flatbuffers's version * run `vcpkg x-add-version` * upgrade flatbuffers to v2.0.0 for mnn * add new port-version of `mnn` after upgrade the flatbuffers * fix the port-version of `mnn` * Update ports/mnn/vcpkg.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/flatbuffers/CONTROL Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * run `vcpkg x-add-version flatbuffers --overwrite-version` * run `vcpkg x-add-version mnn --overwrite-version` * regenerate code files by flatc before build * run `vcpkg x-add-version mnn --overwrite-version` * add `flatbuffers` in dependencies * run `vcpkg x-add-version mnn --overwrite-version` * new port version for mnn * run `vcpkg x-add-version mnn --overwrite-version` to rebuild * Update versions/m-/mnn.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/mnn/vcpkg.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * run `vcpkg x-add-version mnn --overwrite-version` * Add missing quotes. Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> Co-authored-by: Billy Robert ONeal III <bion@microsoft.com>
21 lines
594 B
Diff
21 lines
594 B
Diff
diff --git a/src/util.cpp b/src/util.cpp
|
|
index 3670a019..fb5d884f 100644
|
|
--- a/src/util.cpp
|
|
+++ b/src/util.cpp
|
|
@@ -255,9 +255,15 @@ bool ReadEnvironmentVariable(const char *var_name, std::string *_value) {
|
|
#ifdef _MSC_VER
|
|
__pragma(warning(disable : 4996)); // _CRT_SECURE_NO_WARNINGS
|
|
#endif
|
|
+#if _WIN32_WINNT < 0x0A00
|
|
auto env_str = std::getenv(var_name);
|
|
if (!env_str) return false;
|
|
if (_value) *_value = std::string(env_str);
|
|
+#else
|
|
+ //There is no support for environment variables in UWP
|
|
+ var_name; // Do nothing
|
|
+ *_value = std::string("");
|
|
+#endif
|
|
return true;
|
|
}
|
|
|