File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
packages/react-native-node-api-cmake/src Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,16 @@ import path from "node:path";
44
55import { AndroidTriplet } from "react-native-node-api-modules" ;
66
7+ import { isNinjaAvailable } from "./ninja.js" ;
8+
9+ function getCmakeGenerator ( ) {
10+ if ( isNinjaAvailable ( ) ) {
11+ return "Ninja" ;
12+ } else {
13+ return "Unix Makefiles" ;
14+ }
15+ }
16+
717export const DEFAULT_ANDROID_TRIPLETS = [
818 "aarch64-linux-android" ,
919 "armv7a-linux-androideabi" ,
@@ -49,9 +59,8 @@ export function getAndroidConfigureCmakeArgs({
4959 const architecture = ANDROID_ARCHITECTURES [ triplet ] ;
5060
5161 return [
52- // Use the XCode as generator for Apple platforms
5362 "-G" ,
54- "Ninja" ,
63+ getCmakeGenerator ( ) ,
5564 "--toolchain" ,
5665 toolchainPath ,
5766 "-D" ,
You can’t perform that action at this time.
0 commit comments