mirror of
https://github.com/Relintai/godot-lportal.git
synced 2024-11-11 10:52:09 +01:00
7515bda46c
And also moved to a unity build.
31 lines
845 B
Plaintext
31 lines
845 B
Plaintext
# SCsub
|
|
Import('env')
|
|
|
|
sources = [
|
|
"lportal_all.cpp",
|
|
# "register_types.cpp",
|
|
# "lroom.cpp",
|
|
# "lroom_manager.cpp",
|
|
# "lroom_converter.cpp",
|
|
# "lportal.cpp",
|
|
# "lplanes_pool.cpp",
|
|
# "ldob.cpp",
|
|
# "lbound.cpp",
|
|
# "lbitfield_dynamic.cpp",
|
|
]
|
|
|
|
module_env = env.Clone()
|
|
module_env.Append(CXXFLAGS=['-O2', '-std=c++11', '-Wno-sign-compare', '-Wno-strict-aliasing'])
|
|
|
|
if ARGUMENTS.get('lportal_shared', 'no') == 'yes':
|
|
# Shared lib compilation
|
|
module_env.Append(CXXFLAGS='-fPIC')
|
|
module_env['LIBS'] = []
|
|
shared_lib = module_env.SharedLibrary(target='#bin/lportal', source=sources)
|
|
shared_lib_shim = shared_lib[0].name.rsplit('.', 1)[0]
|
|
env.Append(LIBS=[shared_lib_shim])
|
|
env.Append(LIBPATH=['#bin'])
|
|
else:
|
|
# Static compilation
|
|
module_env.add_source_files(env.modules_sources, sources)
|