diff --git a/src/vcpkg/commands.build.cpp b/src/vcpkg/commands.build.cpp index ff094dcc9b..ef901fb9e3 100644 --- a/src/vcpkg/commands.build.cpp +++ b/src/vcpkg/commands.build.cpp @@ -1047,6 +1047,10 @@ namespace vcpkg { return m_paths.scripts / "toolchains/ios.cmake"; } + else if (cmake_system_name == "OHOS") + { + return m_paths.scripts / "toolchains/ohos.cmake"; + } else { Checks::msg_exit_with_message(VCPKG_LINE_INFO, diff --git a/src/vcpkg/platform-expression.cpp b/src/vcpkg/platform-expression.cpp index 92a3b7b855..a59eca265e 100644 --- a/src/vcpkg/platform-expression.cpp +++ b/src/vcpkg/platform-expression.cpp @@ -43,6 +43,7 @@ namespace vcpkg::PlatformExpression tvos, watchos, visionos, + ohos, static_link, static_crt, @@ -80,6 +81,7 @@ namespace vcpkg::PlatformExpression {"tvos", Identifier::tvos}, {"watchos", Identifier::watchos}, {"visionos", Identifier::visionos}, + {"ohos", Identifier::ohos}, {"static", Identifier::static_link}, {"staticcrt", Identifier::static_crt}, {"native", Identifier::native}, @@ -707,6 +709,7 @@ namespace vcpkg::PlatformExpression case Identifier::watchos: return true_if_exists_and_equal("VCPKG_CMAKE_SYSTEM_NAME", "watchOS"); case Identifier::visionos: return true_if_exists_and_equal("VCPKG_CMAKE_SYSTEM_NAME", "visionOS"); + case Identifier::ohos: return true_if_exists_and_equal("VCPKG_CMAKE_SYSTEM_NAME", "OHOS"); case Identifier::static_link: return true_if_exists_and_equal("VCPKG_LIBRARY_LINKAGE", "static"); case Identifier::static_crt: return true_if_exists_and_equal("VCPKG_CRT_LINKAGE", "static");