From 37fabf7e921e93ac2e20f3f56f0e258cf9503136 Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Sat, 1 Sep 2018 21:46:18 +1000 Subject: [PATCH] Improved platform checks --- SConstruct | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index be557b8e..b4702e47 100644 --- a/SConstruct +++ b/SConstruct @@ -1,6 +1,6 @@ #!python -import os, subprocess, platform +import os, subprocess, platform, sys def add_sources(sources, dir, extension): @@ -21,7 +21,7 @@ result_path = 'bin' 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 env['CXX']='g++' @@ -80,6 +80,9 @@ elif target_platform == 'osx': env.Append(CCFLAGS = [ '-g','-O3', '-std=c++14', '-arch', 'x86_64' ]) 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'])