From fa53af63cee23b1cef623bdf2b5325a3dfae6ad4 Mon Sep 17 00:00:00 2001 From: ElenaDiachenko Date: Fri, 27 Dec 2024 13:20:22 +0200 Subject: [PATCH] add cmake check --- .yarnrc.yml | 2 ++ .../templates/platforms/tvos/Podfile | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.yarnrc.yml b/.yarnrc.yml index 08d714dfc..2cfa2b089 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1,3 +1,5 @@ nodeLinker: node-modules yarnPath: .yarn/releases/yarn-3.6.4.cjs + +checksumBehavior: update diff --git a/packages/engine-rn-tvos/templates/platforms/tvos/Podfile b/packages/engine-rn-tvos/templates/platforms/tvos/Podfile index 741e7b076..315192d34 100644 --- a/packages/engine-rn-tvos/templates/platforms/tvos/Podfile +++ b/packages/engine-rn-tvos/templates/platforms/tvos/Podfile @@ -1,8 +1,23 @@ - source 'https://github.com/react-native-tvos/react-native-tvos-podspecs.git' source 'https://cdn.cocoapods.org/' {{INJECT_PLUGIN_PODFILE_SOURCES}} + +cmake_path = `command -v cmake` +if cmake_path == "" + brew_path = `command -v brew` + if brew_path != "" + Pod::UI.puts "Installing CMake using brew. This is required to build project.".red + `brew install cmake` + else + Pod::UI.puts "In order to build project locally, you need cmake installed, please install it and try again".red + return + end +else + Pod::UI.puts "Cmake found at: #{cmake_path}".green +end + + # Resolve react_native_pods.rb with node to allow for hoisting def node_require(script) # Resolve script with node to allow for hoisting