Merge pull request #179 from BastiaanOlij/improve_platform_check

Improved platform checks
pull/186/head
Bastiaan Olij 2018-09-01 21:51:50 +10:00 committed by GitHub
commit c6da2c0abe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!python #!python
import os, subprocess, platform import os, subprocess, platform, sys
def add_sources(sources, dir, extension): def add_sources(sources, dir, extension):
@ -21,7 +21,7 @@ result_path = 'bin'
result_name = ARGUMENTS.get('n', ARGUMENTS.get('name', os.path.relpath('.', '..'))) result_name = ARGUMENTS.get('n', ARGUMENTS.get('name', os.path.relpath('.', '..')))
if target_platform == 'linux': if target_platform == 'linux' or platform == "x11":
result_name += '.linux.' + target_arch result_name += '.linux.' + target_arch
env['CXX']='g++' env['CXX']='g++'
@ -80,6 +80,9 @@ elif target_platform == 'osx':
env.Append(CCFLAGS = [ '-g','-O3', '-std=c++14', '-arch', 'x86_64' ]) env.Append(CCFLAGS = [ '-g','-O3', '-std=c++14', '-arch', 'x86_64' ])
env.Append(LINKFLAGS = [ '-arch', 'x86_64', '-framework', 'Cocoa', '-Wl,-undefined,dynamic_lookup' ]) env.Append(LINKFLAGS = [ '-arch', 'x86_64', '-framework', 'Cocoa', '-Wl,-undefined,dynamic_lookup' ])
else:
print("The only supported targets are 'osx', 'linux' and 'windows'.")
sys.exit(255)
env.Append(CPPPATH=['.', godot_headers, 'include', 'include/gen', 'include/core']) env.Append(CPPPATH=['.', godot_headers, 'include', 'include/gen', 'include/core'])