SCons: Always use env.Prepend for CPPPATH
Include paths are processed from left to right, so we use Prepend to ensure that paths to bundled thirdparty files will have precedence over system paths (e.g. `/usr/include` should have lowest priority).
This commit is contained in:
parent
e949d6c2ae
commit
d52b70fb5e
|
@ -189,7 +189,7 @@ Help(opts.GenerateHelpText(env_base)) # generate help
|
|||
|
||||
# add default include paths
|
||||
|
||||
env_base.Append(CPPPATH=['#editor', '#'])
|
||||
env_base.Prepend(CPPPATH=['#', '#editor'])
|
||||
|
||||
# configure ENV for platform
|
||||
env_base.platform_exporters = platform_exporters
|
||||
|
|
|
@ -80,9 +80,9 @@ if env['builtin_zlib']:
|
|||
]
|
||||
thirdparty_zlib_sources = [thirdparty_zlib_dir + file for file in thirdparty_zlib_sources]
|
||||
|
||||
env_thirdparty.Append(CPPPATH=[thirdparty_zlib_dir])
|
||||
env_thirdparty.Prepend(CPPPATH=[thirdparty_zlib_dir])
|
||||
# Needs to be available in main env too
|
||||
env.Append(CPPPATH=[thirdparty_zlib_dir])
|
||||
env.Prepend(CPPPATH=[thirdparty_zlib_dir])
|
||||
|
||||
env_thirdparty.add_source_files(env.core_sources, thirdparty_zlib_sources)
|
||||
|
||||
|
@ -128,9 +128,9 @@ if env['builtin_zstd']:
|
|||
]
|
||||
thirdparty_zstd_sources = [thirdparty_zstd_dir + file for file in thirdparty_zstd_sources]
|
||||
|
||||
env_thirdparty.Append(CPPPATH=[thirdparty_zstd_dir, thirdparty_zstd_dir + "common"])
|
||||
env_thirdparty.Prepend(CPPPATH=[thirdparty_zstd_dir, thirdparty_zstd_dir + "common"])
|
||||
env_thirdparty.Append(CPPFLAGS="-DZSTD_STATIC_LINKING_ONLY")
|
||||
env.Append(CPPPATH=thirdparty_zstd_dir)
|
||||
env.Prepend(CPPPATH=thirdparty_zstd_dir)
|
||||
# Also needed in main env includes will trigger warnings
|
||||
env.Append(CPPFLAGS="-DZSTD_STATIC_LINKING_ONLY")
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ if (env["platform"] in ["haiku", "osx", "windows", "x11"]):
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env.Append(CPPPATH=[thirdparty_dir])
|
||||
env.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env.Append(CPPFLAGS=['-DGLAD_ENABLED'])
|
||||
env.Append(CPPFLAGS=['-DGLES_OVER_GL'])
|
||||
|
|
|
@ -26,9 +26,9 @@ if env['builtin_libpng']:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_png.Append(CPPPATH=[thirdparty_dir])
|
||||
env_png.Prepend(CPPPATH=[thirdparty_dir])
|
||||
# Needed for drivers includes and in platform/javascript
|
||||
env.Append(CPPPATH=[thirdparty_dir])
|
||||
env.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
# Currently .ASM filter_neon.S does not compile on NT.
|
||||
import os
|
||||
|
|
|
@ -4,19 +4,19 @@ Import('env')
|
|||
Import('env_modules')
|
||||
|
||||
env_assimp = env_modules.Clone()
|
||||
env_assimp.Append(CPPPATH=['#thirdparty/assimp'])
|
||||
env_assimp.Append(CPPPATH=['#thirdparty/assimp/include'])
|
||||
env_assimp.Append(CPPPATH=['#thirdparty/assimp/code/Importer/IFC'])
|
||||
env_assimp.Append(CPPPATH=['#thirdparty/misc'])
|
||||
env_assimp.Append(CPPPATH=['#thirdparty/assimp/code'])
|
||||
env_assimp.Append(CPPPATH=['#thirdparty/assimp/contrib/irrXML/'])
|
||||
env_assimp.Append(CPPPATH=['#thirdparty/assimp/contrib/unzip/'])
|
||||
env_assimp.Append(CPPPATH=['#thirdparty/assimp/code/Importer/STEPParser'])
|
||||
env_assimp.Append(CPPPATH=['#thirdparty/assimp/'])
|
||||
env_assimp.Append(CPPPATH=['#thirdparty/zlib/'])
|
||||
env_assimp.Append(CPPPATH=['#thirdparty/assimp/contrib/openddlparser/include'])
|
||||
env_assimp.Append(CPPPATH=['#thirdparty/assimp/contrib/rapidjson/include'])
|
||||
env_assimp.Append(CPPPATH=['.'])
|
||||
env_assimp.Prepend(CPPPATH=['#thirdparty/assimp'])
|
||||
env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/include'])
|
||||
env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/code/Importer/IFC'])
|
||||
env_assimp.Prepend(CPPPATH=['#thirdparty/misc'])
|
||||
env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/code'])
|
||||
env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/contrib/irrXML/'])
|
||||
env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/contrib/unzip/'])
|
||||
env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/code/Importer/STEPParser'])
|
||||
env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/'])
|
||||
env_assimp.Prepend(CPPPATH=['#thirdparty/zlib/'])
|
||||
env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/contrib/openddlparser/include'])
|
||||
env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/contrib/rapidjson/include'])
|
||||
env_assimp.Prepend(CPPPATH=['.'])
|
||||
#env_assimp.Append(CPPFLAGS=['-DASSIMP_DOUBLE_PRECISION']) # TODO default to what godot is compiled with for future double support
|
||||
env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_BOOST_WORKAROUND'])
|
||||
env_assimp.Append(CPPFLAGS=['-DOPENDDLPARSER_BUILD'])
|
||||
|
|
|
@ -186,7 +186,7 @@ if env['builtin_bullet']:
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in bullet2_src]
|
||||
|
||||
env_bullet.Append(CPPPATH=[thirdparty_dir])
|
||||
env_bullet.Prepend(CPPPATH=[thirdparty_dir])
|
||||
# if env['target'] == "debug" or env['target'] == "release_debug":
|
||||
# env_bullet.Append(CPPFLAGS=['-DBT_DEBUG'])
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ if env['builtin_squish']:
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_cvtt.Append(CPPPATH=[thirdparty_dir])
|
||||
env_cvtt.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env_thirdparty = env_cvtt.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
@ -21,7 +21,7 @@ if env['builtin_enet']:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_enet.Append(CPPPATH=[thirdparty_dir])
|
||||
env_enet.Prepend(CPPPATH=[thirdparty_dir])
|
||||
env_enet.Append(CPPFLAGS=["-DGODOT_ENET"])
|
||||
|
||||
env_thirdparty = env_enet.Clone()
|
||||
|
|
|
@ -27,7 +27,7 @@ thirdparty_sources = [
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_etc.Append(CPPPATH=[thirdparty_dir])
|
||||
env_etc.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
# upstream uses c++11
|
||||
if not env.msvc:
|
||||
|
|
|
@ -68,9 +68,9 @@ if env['builtin_freetype']:
|
|||
sfnt = env_freetype.Object(sfnt, CPPFLAGS=['-U__OPTIMIZE__'])
|
||||
thirdparty_sources += [sfnt]
|
||||
|
||||
env_freetype.Append(CPPPATH=[thirdparty_dir + "/include"])
|
||||
env_freetype.Prepend(CPPPATH=[thirdparty_dir + "/include"])
|
||||
# Also needed in main env for scene/
|
||||
env.Append(CPPPATH=[thirdparty_dir + "/include"])
|
||||
env.Prepend(CPPPATH=[thirdparty_dir + "/include"])
|
||||
|
||||
env_freetype.Append(CPPFLAGS=['-DFT2_BUILD_LIBRARY', '-DFT_CONFIG_OPTION_USE_PNG'])
|
||||
if (env['target'] != 'release'):
|
||||
|
@ -78,7 +78,7 @@ if env['builtin_freetype']:
|
|||
|
||||
# Also requires libpng headers
|
||||
if env['builtin_libpng']:
|
||||
env_freetype.Append(CPPPATH=["#thirdparty/libpng"])
|
||||
env_freetype.Prepend(CPPPATH=["#thirdparty/libpng"])
|
||||
|
||||
env_thirdparty = env_freetype.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
@ -12,7 +12,7 @@ env_gdnative.add_source_files(env.modules_sources, "nativescript/*.cpp")
|
|||
env_gdnative.add_source_files(env.modules_sources, "gdnative_library_singleton_editor.cpp")
|
||||
env_gdnative.add_source_files(env.modules_sources, "gdnative_library_editor_plugin.cpp")
|
||||
|
||||
env_gdnative.Append(CPPPATH=['#modules/gdnative/include/'])
|
||||
env_gdnative.Prepend(CPPPATH=['#modules/gdnative/include/'])
|
||||
|
||||
Export('env_gdnative')
|
||||
|
||||
|
@ -36,7 +36,7 @@ if ARGUMENTS.get('gdnative_wrapper', False):
|
|||
gensource, = env_gdnative.CommandNoCache('gdnative_wrapper_code.gen.cpp', 'gdnative_api.json', run_in_subprocess(gdnative_builders.build_gdnative_wrapper_code))
|
||||
|
||||
gd_wrapper_env = env.Clone()
|
||||
gd_wrapper_env.Append(CPPPATH=['#modules/gdnative/include/'])
|
||||
gd_wrapper_env.Prepend(CPPPATH=['#modules/gdnative/include/'])
|
||||
|
||||
if gd_wrapper_env['use_lto']:
|
||||
if not env.msvc:
|
||||
|
|
|
@ -5,5 +5,5 @@ Import('env_modules')
|
|||
|
||||
env_vsdecoder_gdnative = env_modules.Clone()
|
||||
|
||||
env_vsdecoder_gdnative.Append(CPPPATH=['#modules/gdnative/include/'])
|
||||
env_vsdecoder_gdnative.Prepend(CPPPATH=['#modules/gdnative/include/'])
|
||||
env_vsdecoder_gdnative.add_source_files(env.modules_sources, '*.cpp')
|
||||
|
|
|
@ -13,7 +13,7 @@ thirdparty_sources = [
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_jpg.Append(CPPPATH=[thirdparty_dir])
|
||||
env_jpg.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env_thirdparty = env_jpg.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
@ -70,7 +70,7 @@ def configure(env, env_mono):
|
|||
mono_lib_path = os.path.join(mono_root, 'lib')
|
||||
|
||||
env.Append(LIBPATH=mono_lib_path)
|
||||
env_mono.Append(CPPPATH=os.path.join(mono_root, 'include', 'mono-2.0'))
|
||||
env_mono.Prepend(CPPPATH=os.path.join(mono_root, 'include', 'mono-2.0'))
|
||||
|
||||
if mono_static:
|
||||
lib_suffix = Environment()['LIBSUFFIX']
|
||||
|
@ -153,7 +153,7 @@ def configure(env, env_mono):
|
|||
mono_lib_path = os.path.join(mono_root, 'lib')
|
||||
|
||||
env.Append(LIBPATH=mono_lib_path)
|
||||
env_mono.Append(CPPPATH=os.path.join(mono_root, 'include', 'mono-2.0'))
|
||||
env_mono.Prepend(CPPPATH=os.path.join(mono_root, 'include', 'mono-2.0'))
|
||||
|
||||
mono_lib = find_file_in_dir(mono_lib_path, mono_lib_names, prefix='lib', extension='.a')
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ if env['builtin_libogg']:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_ogg.Append(CPPPATH=[thirdparty_dir])
|
||||
env_ogg.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env_thirdparty = env_ogg.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
@ -12,7 +12,7 @@ thirdparty_sources = [
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_opensimplex.Append(CPPPATH=[thirdparty_dir])
|
||||
env_opensimplex.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env_thirdparty = env_opensimplex.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
@ -206,7 +206,7 @@ if env['builtin_opus']:
|
|||
|
||||
# also requires libogg
|
||||
if env['builtin_libogg']:
|
||||
env_opus.Append(CPPPATH=["#thirdparty/libogg"])
|
||||
env_opus.Prepend(CPPPATH=["#thirdparty/libogg"])
|
||||
|
||||
env_opus.Append(CPPFLAGS=["-DHAVE_CONFIG_H"])
|
||||
|
||||
|
@ -218,7 +218,7 @@ if env['builtin_opus']:
|
|||
"silk/fixed",
|
||||
"silk/float",
|
||||
]
|
||||
env_opus.Append(CPPPATH=[thirdparty_dir + "/" + dir for dir in thirdparty_include_paths])
|
||||
env_opus.Prepend(CPPPATH=[thirdparty_dir + "/" + dir for dir in thirdparty_include_paths])
|
||||
|
||||
if env["platform"] == "android":
|
||||
if ("android_arch" in env and env["android_arch"] in ["armv6", "armv7"]):
|
||||
|
|
|
@ -17,7 +17,7 @@ thirdparty_sources = [
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_pvr.Append(CPPPATH=[thirdparty_dir])
|
||||
env_pvr.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env_thirdparty = env_pvr.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
@ -23,7 +23,7 @@ if env['builtin_recast']:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_recast.Append(CPPPATH=[thirdparty_dir + "/Include"])
|
||||
env_recast.Prepend(CPPPATH=[thirdparty_dir + "/Include"])
|
||||
|
||||
env_thirdparty = env_recast.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
@ -46,7 +46,7 @@ if env['builtin_pcre2']:
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_regex.Append(CPPPATH=[thirdparty_dir])
|
||||
env_regex.Prepend(CPPPATH=[thirdparty_dir])
|
||||
env_regex.Append(CPPFLAGS=thirdparty_flags)
|
||||
|
||||
def pcre2_builtin(width):
|
||||
|
|
|
@ -22,7 +22,7 @@ if env['builtin_squish']:
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_squish.Append(CPPPATH=[thirdparty_dir])
|
||||
env_squish.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env_thirdparty = env_squish.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
@ -12,10 +12,10 @@ thirdparty_sources = [
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_svg.Append(CPPPATH=[thirdparty_dir])
|
||||
env_svg.Prepend(CPPPATH=[thirdparty_dir])
|
||||
# FIXME: Needed in editor/editor_themes.cpp for now, but ideally there
|
||||
# shouldn't be a dependency on modules/ and its own 3rd party deps.
|
||||
env.Append(CPPPATH=[thirdparty_dir])
|
||||
env.Prepend(CPPPATH=[thirdparty_dir])
|
||||
env.Append(CPPFLAGS=["-DSVG_ENABLED"])
|
||||
|
||||
env_thirdparty = env_svg.Clone()
|
||||
|
|
|
@ -70,13 +70,13 @@ if env['builtin_libtheora']:
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_theora.Append(CPPPATH=[thirdparty_dir])
|
||||
env_theora.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
# also requires libogg and libvorbis
|
||||
if env['builtin_libogg']:
|
||||
env_theora.Append(CPPPATH=["#thirdparty/libogg"])
|
||||
env_theora.Prepend(CPPPATH=["#thirdparty/libogg"])
|
||||
if env['builtin_libvorbis']:
|
||||
env_theora.Append(CPPPATH=["#thirdparty/libvorbis"])
|
||||
env_theora.Prepend(CPPPATH=["#thirdparty/libvorbis"])
|
||||
|
||||
env_thirdparty = env_theora.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
@ -13,7 +13,7 @@ thirdparty_sources = [
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_tinyexr.Append(CPPPATH=[thirdparty_dir])
|
||||
env_tinyexr.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env_thirdparty = env_tinyexr.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
@ -25,7 +25,7 @@ if env['builtin_miniupnpc']:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_upnp.Append(CPPPATH=[thirdparty_dir])
|
||||
env_upnp.Prepend(CPPPATH=[thirdparty_dir])
|
||||
env_upnp.Append(CPPFLAGS=["-DMINIUPNP_STATICLIB"])
|
||||
|
||||
env_thirdparty = env_upnp.Clone()
|
||||
|
|
|
@ -24,7 +24,7 @@ thirdparty_sources = [
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_vhacd.Append(CPPPATH=[thirdparty_dir+"/inc"])
|
||||
env_vhacd.Prepend(CPPPATH=[thirdparty_dir + "/inc"])
|
||||
env_vhacd.Append(CPPFLAGS=["-DGODOT_ENET"])
|
||||
|
||||
# upstream uses c++11
|
||||
|
|
|
@ -40,11 +40,11 @@ if env['builtin_libvorbis']:
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_vorbis.Append(CPPPATH=[thirdparty_dir])
|
||||
env_vorbis.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
# also requires libogg
|
||||
if env['builtin_libogg']:
|
||||
env_vorbis.Append(CPPPATH=["#thirdparty/libogg"])
|
||||
env_vorbis.Prepend(CPPPATH=["#thirdparty/libogg"])
|
||||
|
||||
env_thirdparty = env_vorbis.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
@ -15,7 +15,7 @@ thirdparty_sources = [
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_webm.Append(CPPPATH=[thirdparty_dir, thirdparty_dir + "libwebm/"])
|
||||
env_webm.Prepend(CPPPATH=[thirdparty_dir, thirdparty_dir + "libwebm/"])
|
||||
|
||||
# upstream uses c++11
|
||||
if (not env_webm.msvc):
|
||||
|
@ -23,14 +23,14 @@ if (not env_webm.msvc):
|
|||
|
||||
# also requires libogg, libvorbis and libopus
|
||||
if env['builtin_libogg']:
|
||||
env_webm.Append(CPPPATH=["#thirdparty/libogg"])
|
||||
env_webm.Prepend(CPPPATH=["#thirdparty/libogg"])
|
||||
if env['builtin_libvorbis']:
|
||||
env_webm.Append(CPPPATH=["#thirdparty/libvorbis"])
|
||||
env_webm.Prepend(CPPPATH=["#thirdparty/libvorbis"])
|
||||
if env['builtin_opus']:
|
||||
env_webm.Append(CPPPATH=["#thirdparty/opus"])
|
||||
env_webm.Prepend(CPPPATH=["#thirdparty/opus"])
|
||||
|
||||
if env['builtin_libvpx']:
|
||||
env_webm.Append(CPPPATH=["#thirdparty/libvpx"])
|
||||
env_webm.Prepend(CPPPATH=["#thirdparty/libvpx"])
|
||||
SConscript("libvpx/SCsub")
|
||||
|
||||
env_thirdparty = env_webm.Clone()
|
||||
|
|
|
@ -256,7 +256,7 @@ libvpx_sources_arm_neon_gas_apple = [libvpx_dir + file for file in libvpx_source
|
|||
|
||||
env_libvpx = env_modules.Clone()
|
||||
env_libvpx.disable_warnings()
|
||||
env_libvpx.Append(CPPPATH=[libvpx_dir])
|
||||
env_libvpx.Prepend(CPPPATH=[libvpx_dir])
|
||||
|
||||
webm_multithread = env["platform"] != 'javascript'
|
||||
|
||||
|
@ -380,7 +380,7 @@ if webm_cpu_x86:
|
|||
elif webm_cpu_arm:
|
||||
env_libvpx.add_source_files(env.modules_sources, libvpx_sources_arm)
|
||||
if env["platform"] == 'android':
|
||||
env_libvpx.Append(CPPPATH=[libvpx_dir + "third_party/android"])
|
||||
env_libvpx.Prepend(CPPPATH=[libvpx_dir + "third_party/android"])
|
||||
env_libvpx.add_source_files(env.modules_sources, [libvpx_dir + "third_party/android/cpu-features.c"])
|
||||
|
||||
env_libvpx_neon = env_libvpx.Clone()
|
||||
|
|
|
@ -126,7 +126,7 @@ if env['builtin_libwebp']:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + "src/" + file for file in thirdparty_sources]
|
||||
|
||||
env_webp.Append(CPPPATH=[thirdparty_dir, thirdparty_dir + "src/"])
|
||||
env_webp.Prepend(CPPPATH=[thirdparty_dir, thirdparty_dir + "src/"])
|
||||
|
||||
env_thirdparty = env_webp.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
@ -10,7 +10,6 @@ use_gdnative = env_webrtc["module_gdnative_enabled"]
|
|||
|
||||
if use_gdnative: # GDNative is retained in Javascript for export compatibility
|
||||
env_webrtc.Append(CPPDEFINES=['WEBRTC_GDNATIVE_ENABLED'])
|
||||
gdnative_includes = ["#modules/gdnative/include/"]
|
||||
env_webrtc.Append(CPPPATH=gdnative_includes)
|
||||
env_webrtc.Prepend(CPPPATH=["#modules/gdnative/include/"])
|
||||
|
||||
env_webrtc.add_source_files(env.modules_sources, "*.cpp")
|
||||
|
|
|
@ -75,7 +75,7 @@ if env['builtin_libwebsockets'] and not env["platform"] == "javascript": # alrea
|
|||
else: # Unix socket
|
||||
thirdparty_sources += Glob(thirdparty_dir + "lib/plat/unix/*.c")
|
||||
|
||||
env_lws.Append(CPPPATH=[thirdparty_dir + 'include/'])
|
||||
env_lws.Prepend(CPPPATH=[thirdparty_dir + 'include/'])
|
||||
|
||||
if env['builtin_mbedtls']:
|
||||
mbedtls_includes = "#thirdparty/mbedtls/include"
|
||||
|
@ -85,14 +85,14 @@ if env['builtin_libwebsockets'] and not env["platform"] == "javascript": # alrea
|
|||
env_lws.Prepend(CPPPATH=wrapper_includes)
|
||||
|
||||
if env["platform"] == "windows" or env["platform"] == "uwp":
|
||||
env_lws.Append(CPPPATH=[helper_dir])
|
||||
env_lws.Prepend(CPPPATH=[helper_dir])
|
||||
|
||||
if env["platform"] == "uwp":
|
||||
env_lws.Append(CPPFLAGS=["/DLWS_MINGW_SUPPORT"])
|
||||
|
||||
env_thirdparty = env_lws.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
env_thirdparty.Append(CPPPATH=[thirdparty_dir + 'lib/'])
|
||||
env_thirdparty.Prepend(CPPPATH=[thirdparty_dir + 'lib/'])
|
||||
env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
|
||||
|
||||
env_lws.add_source_files(env.modules_sources, "*.cpp")
|
||||
|
|
|
@ -13,7 +13,7 @@ if env['builtin_xatlas']:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_xatlas_unwrap.Append(CPPPATH=[thirdparty_dir])
|
||||
env_xatlas_unwrap.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
# upstream uses c++11
|
||||
if (not env.msvc):
|
||||
|
|
|
@ -299,7 +299,7 @@ def configure(env):
|
|||
env.Append(LIBPATH=[env["ANDROID_NDK_ROOT"] +
|
||||
'/toolchains/' + target_subpath + '/prebuilt/' + host_subpath + '/' + abi_subpath + '/lib'])
|
||||
|
||||
env.Append(CPPPATH=['#platform/android'])
|
||||
env.Prepend(CPPPATH=['#platform/android'])
|
||||
env.Append(CPPFLAGS=['-DANDROID_ENABLED', '-DUNIX_ENABLED', '-DNO_FCNTL'])
|
||||
env.Append(LIBS=['OpenSLES', 'EGL', 'GLESv3', 'android', 'log', 'z', 'dl'])
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ def configure(env):
|
|||
|
||||
if not env['builtin_miniupnpc']:
|
||||
# No pkgconfig file so far, hardcode default paths.
|
||||
env.Append(CPPPATH=["/system/develop/headers/x86/miniupnpc"])
|
||||
env.Prepend(CPPPATH=["/system/develop/headers/x86/miniupnpc"])
|
||||
env.Append(LIBS=["miniupnpc"])
|
||||
|
||||
# On Linux wchar_t should be 32-bits
|
||||
|
@ -147,7 +147,7 @@ def configure(env):
|
|||
|
||||
## Flags
|
||||
|
||||
env.Append(CPPPATH=['#platform/haiku'])
|
||||
env.Prepend(CPPPATH=['#platform/haiku'])
|
||||
env.Append(CPPFLAGS=['-DUNIX_ENABLED', '-DOPENGL_ENABLED', '-DGLES_ENABLED'])
|
||||
env.Append(CPPFLAGS=['-DMEDIA_KIT_ENABLED'])
|
||||
# env.Append(CPPFLAGS=['-DFREETYPE_ENABLED'])
|
||||
|
|
|
@ -165,12 +165,12 @@ def configure(env):
|
|||
if env['icloud']:
|
||||
env.Append(CPPFLAGS=['-DICLOUD_ENABLED'])
|
||||
|
||||
env.Append(CPPPATH=['$IPHONESDK/usr/include',
|
||||
env.Prepend(CPPPATH=['$IPHONESDK/usr/include',
|
||||
'$IPHONESDK/System/Library/Frameworks/OpenGLES.framework/Headers',
|
||||
'$IPHONESDK/System/Library/Frameworks/AudioUnit.framework/Headers',
|
||||
])
|
||||
|
||||
env['ENV']['CODESIGN_ALLOCATE'] = '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate'
|
||||
|
||||
env.Append(CPPPATH=['#platform/iphone'])
|
||||
env.Prepend(CPPPATH=['#platform/iphone'])
|
||||
env.Append(CPPFLAGS=['-DIPHONE_ENABLED', '-DUNIX_ENABLED', '-DGLES_ENABLED', '-DCOREAUDIO_ENABLED'])
|
||||
|
|
|
@ -103,7 +103,7 @@ def configure(env):
|
|||
|
||||
## Compile flags
|
||||
|
||||
env.Append(CPPPATH=['#platform/javascript'])
|
||||
env.Prepend(CPPPATH=['#platform/javascript'])
|
||||
env.Append(CPPDEFINES=['JAVASCRIPT_ENABLED', 'UNIX_ENABLED'])
|
||||
|
||||
# No multi-threading (SharedArrayBuffer) available yet,
|
||||
|
|
|
@ -126,7 +126,7 @@ def configure(env):
|
|||
|
||||
## Flags
|
||||
|
||||
env.Append(CPPPATH=['#platform/osx'])
|
||||
env.Prepend(CPPPATH=['#platform/osx'])
|
||||
env.Append(CPPFLAGS=['-DOSX_ENABLED', '-DUNIX_ENABLED', '-DGLES_ENABLED', '-DAPPLE_STYLE_KEYS', '-DCOREAUDIO_ENABLED', '-DCOREMIDI_ENABLED'])
|
||||
env.Append(LINKFLAGS=['-framework', 'Cocoa', '-framework', 'Carbon', '-framework', 'OpenGL', '-framework', 'AGL', '-framework', 'AudioUnit', '-framework', 'CoreAudio', '-framework', 'CoreMIDI', '-lz', '-framework', 'IOKit', '-framework', 'ForceFeedback', '-framework', 'CoreVideo'])
|
||||
env.Append(LIBS=['pthread'])
|
||||
|
|
|
@ -201,7 +201,7 @@ def configure(env):
|
|||
|
||||
if not env['builtin_miniupnpc']:
|
||||
# No pkgconfig file so far, hardcode default paths.
|
||||
env.Append(CPPPATH=["/usr/include/miniupnpc"])
|
||||
env.Prepend(CPPPATH=["/usr/include/miniupnpc"])
|
||||
env.Append(LIBS=["miniupnpc"])
|
||||
|
||||
# On Linux wchar_t should be 32-bits
|
||||
|
@ -215,7 +215,7 @@ def configure(env):
|
|||
if not env['builtin_zlib']:
|
||||
env.ParseConfig('pkg-config zlib --cflags --libs')
|
||||
|
||||
env.Append(CPPPATH=['#platform/server'])
|
||||
env.Prepend(CPPPATH=['#platform/server'])
|
||||
env.Append(CPPFLAGS=['-DSERVER_ENABLED', '-DUNIX_ENABLED'])
|
||||
|
||||
if (platform.system() == "Darwin"):
|
||||
|
|
|
@ -77,7 +77,7 @@ def configure(env):
|
|||
|
||||
# ANGLE
|
||||
angle_root = os.getenv("ANGLE_SRC_PATH")
|
||||
env.Append(CPPPATH=[angle_root + '/include'])
|
||||
env.Prepend(CPPPATH=[angle_root + '/include'])
|
||||
jobs = str(env.GetOption("num_jobs"))
|
||||
angle_build_cmd = "msbuild.exe " + angle_root + "/winrt/10/src/angle.sln /nologo /v:m /m:" + jobs + " /p:Configuration=Release /p:Platform="
|
||||
|
||||
|
@ -137,7 +137,7 @@ def configure(env):
|
|||
|
||||
## Compile flags
|
||||
|
||||
env.Append(CPPPATH=['#platform/uwp', '#drivers/windows'])
|
||||
env.Prepend(CPPPATH=['#platform/uwp', '#drivers/windows'])
|
||||
env.Append(CPPFLAGS=['/DUWP_ENABLED', '/DWINDOWS_ENABLED', '/DTYPED_METHOD_BIND'])
|
||||
env.Append(CPPFLAGS=['/DGLES_ENABLED', '/DGL_GLEXT_PROTOTYPES', '/DEGL_EGLEXT_PROTOTYPES', '/DANGLE_ENABLED'])
|
||||
winver = "0x0602" # Windows 8 is the minimum target for UWP build
|
||||
|
|
|
@ -201,7 +201,7 @@ def configure_msvc(env, manual_msvc_config):
|
|||
env.AppendUnique(CXXFLAGS=['/TP']) # assume all sources are C++
|
||||
if manual_msvc_config: # should be automatic if SCons found it
|
||||
if os.getenv("WindowsSdkDir") is not None:
|
||||
env.Append(CPPPATH=[os.getenv("WindowsSdkDir") + "/Include"])
|
||||
env.Prepend(CPPPATH=[os.getenv("WindowsSdkDir") + "/Include"])
|
||||
else:
|
||||
print("Missing environment variable: WindowsSdkDir")
|
||||
|
||||
|
@ -239,7 +239,7 @@ def configure_msvc(env, manual_msvc_config):
|
|||
env.AppendUnique(LINKFLAGS=['/LTCG'])
|
||||
|
||||
if manual_msvc_config:
|
||||
env.Append(CPPPATH=[p for p in os.getenv("INCLUDE").split(";")])
|
||||
env.Prepend(CPPPATH=[p for p in os.getenv("INCLUDE").split(";")])
|
||||
env.Append(LIBPATH=[p for p in os.getenv("LIB").split(";")])
|
||||
|
||||
# Incremental linking fix
|
||||
|
@ -342,7 +342,7 @@ def configure_mingw(env):
|
|||
|
||||
def configure(env):
|
||||
# At this point the env has been set up with basic tools/compilers.
|
||||
env.Append(CPPPATH=['#platform/windows'])
|
||||
env.Prepend(CPPPATH=['#platform/windows'])
|
||||
|
||||
print("Configuring for Windows: target=%s, bits=%s" % (env['target'], env['bits']))
|
||||
|
||||
|
|
|
@ -275,7 +275,7 @@ def configure(env):
|
|||
|
||||
if not env['builtin_miniupnpc']:
|
||||
# No pkgconfig file so far, hardcode default paths.
|
||||
env.Append(CPPPATH=["/usr/include/miniupnpc"])
|
||||
env.Prepend(CPPPATH=["/usr/include/miniupnpc"])
|
||||
env.Append(LIBS=["miniupnpc"])
|
||||
|
||||
# On Linux wchar_t should be 32-bits
|
||||
|
@ -316,7 +316,7 @@ def configure(env):
|
|||
if not env['builtin_zlib']:
|
||||
env.ParseConfig('pkg-config zlib --cflags --libs')
|
||||
|
||||
env.Append(CPPPATH=['#platform/x11'])
|
||||
env.Prepend(CPPPATH=['#platform/x11'])
|
||||
env.Append(CPPFLAGS=['-DX11_ENABLED', '-DUNIX_ENABLED', '-DOPENGL_ENABLED', '-DGLES_ENABLED'])
|
||||
env.Append(LIBS=['GL', 'pthread'])
|
||||
|
||||
|
|
Loading…
Reference in New Issue