summarylogtreecommitdiffstats
path: root/0002-use-cmake-build-instead.patch
blob: 69a015897c517ed1d53f850b00f15a84a96d4686 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/xenia-build b/xenia-build
index 3e3c75dea..3e2b04246 100755
--- a/xenia-build
+++ b/xenia-build
@@ -872,10 +872,12 @@ class BaseBuildCommand(Command):
             if result != 0:
                 print('ERROR: cmake failed with one or more errors.')
                 return result
+            targets = ['--target', 'all'] if not len(args['target']) else [item for sublist in [['--target', target] for target in args['target']] for item in sublist]
             result = subprocess.call([
-                    'ninja',
-                    '-C./build/build_%s' % (args['config']),
-                    '-j' if threads == 0 else '-j%d' % threads,
+                    'cmake',
+                    '--build', 'build/build_%s' % (args['config']),
+                    '--parallel', '1' if threads <= 1 else '%d' % threads,
+                    *targets
                 ] + pass_args, shell=False, env=dict(os.environ))
             if result != 0:
                 print('ERROR: ninja failed with one or more errors.')