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";
4
4
5
5
import { AndroidTriplet } from "react-native-node-api-modules" ;
6
6
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
+
7
17
export const DEFAULT_ANDROID_TRIPLETS = [
8
18
"aarch64-linux-android" ,
9
19
"armv7a-linux-androideabi" ,
@@ -49,9 +59,8 @@ export function getAndroidConfigureCmakeArgs({
49
59
const architecture = ANDROID_ARCHITECTURES [ triplet ] ;
50
60
51
61
return [
52
- // Use the XCode as generator for Apple platforms
53
62
"-G" ,
54
- "Ninja" ,
63
+ getCmakeGenerator ( ) ,
55
64
"--toolchain" ,
56
65
toolchainPath ,
57
66
"-D" ,
You can’t perform that action at this time.
0 commit comments