File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " cmake-rn " : minor
3+ ---
4+
5+ Pass --target to CMake
Original file line number Diff line number Diff line change @@ -102,6 +102,11 @@ const defineOption = new Option(
102102 } ,
103103) ;
104104
105+ const targetOption = new Option (
106+ "--target <target...>" ,
107+ "CMake targets to build" ,
108+ ) . default ( [ ] as string [ ] , "Build all targets of the CMake project" ) ;
109+
105110const noAutoLinkOption = new Option (
106111 "--no-auto-link" ,
107112 "Don't mark the output as auto-linkable by react-native-node-api" ,
@@ -122,6 +127,7 @@ let program = new Command("cmake-rn")
122127 . addOption ( configurationOption )
123128 . addOption ( defineOption )
124129 . addOption ( cleanOption )
130+ . addOption ( targetOption )
125131 . addOption ( noAutoLinkOption )
126132 . addOption ( noWeakNodeApiLinkageOption ) ;
127133
@@ -335,6 +341,7 @@ async function buildProject<T extends string>(
335341 buildPath ,
336342 "--config" ,
337343 configuration ,
344+ ...( options . target . length > 0 ? [ "--target" , ...options . target ] : [ ] ) ,
338345 "--" ,
339346 ...platform . buildArgs ( context , options ) ,
340347 ] ,
You can’t perform that action at this time.
0 commit comments