Bladeren bron

Locate interrogate_module correctly when cross-compiling

rdb 13 jaren geleden
bovenliggende
commit
3a665c6e2f
1 gewijzigde bestanden met toevoegingen van 7 en 1 verwijderingen
  1. 7 1
      makepanda/makepanda.py

+ 7 - 1
makepanda/makepanda.py

@@ -1202,7 +1202,13 @@ def CompileImod(wobj, wsrc, opts):
         WriteFile(woutc,"")
         WriteFile(woutc,"")
         CompileCxx(wobj,woutc,opts)
         CompileCxx(wobj,woutc,opts)
         return
         return
-    cmd = GetOutputDir() + '/bin/interrogate_module '
+
+    if not CrossCompiling():
+        # If we're compiling for this platform, we can use the one we've built.
+        cmd = os.path.join(GetOutputDir(), 'bin', 'interrogate_module')
+    else:
+        cmd = 'interrogate_module'
+
     cmd += ' -oc ' + woutc + ' -module ' + module + ' -library ' + library + ' -python-native '
     cmd += ' -oc ' + woutc + ' -module ' + module + ' -library ' + library + ' -python-native '
     for x in wsrc: cmd += ' ' + BracketNameWithQuotes(x)
     for x in wsrc: cmd += ' ' + BracketNameWithQuotes(x)
     oscmd(cmd)
     oscmd(cmd)