mirror of
https://github.com/Relintai/props_2d.git
synced 2025-02-04 16:15:57 +01:00
87 lines
2.1 KiB
Plaintext
87 lines
2.1 KiB
Plaintext
import os
|
|
|
|
Import('env')
|
|
|
|
module_env = env.Clone()
|
|
|
|
import version
|
|
|
|
#if os.path.isdir('../mesh_data_resource'):
|
|
#module_env.Append(CPPDEFINES=['MESH_DATA_RESOURCE_PRESENT'])
|
|
|
|
has_texture_packer = False
|
|
|
|
if os.path.isdir('../texture_packer'):
|
|
has_texture_packer = True
|
|
module_env.Append(CPPDEFINES=['TEXTURE_PACKER_PRESENT'])
|
|
|
|
if os.path.isdir('../terraman'):
|
|
module_env.Append(CPPDEFINES=['TERRAMAN_PRESENT'])
|
|
|
|
if os.path.isdir('../mesh_utils'):
|
|
module_env.Append(CPPDEFINES=['MESH_UTILS_PRESENT'])
|
|
|
|
|
|
if os.path.isdir('../thread_pool'):
|
|
module_env.Append(CPPDEFINES=['THREAD_POOL_PRESENT'])
|
|
|
|
sources = [
|
|
|
|
"register_types.cpp",
|
|
|
|
"lights/prop_light_2d.cpp",
|
|
|
|
"tiled_wall/tiled_wall_2d.cpp",
|
|
"tiled_wall/tiled_wall_data_2d.cpp",
|
|
|
|
"props/prop_data_2d.cpp",
|
|
"props/prop_data_entry_2d.cpp",
|
|
"props/prop_data_scene_2d.cpp",
|
|
"props/prop_data_light_2d.cpp",
|
|
"props/prop_data_prop_2d.cpp",
|
|
"props/prop_data_tiled_wall_2d.cpp",
|
|
|
|
"clutter/ground_clutter_2d.cpp",
|
|
"clutter/ground_clutter_foliage_2d.cpp",
|
|
|
|
"prop_instance_2d.cpp",
|
|
"prop_instance_merger_2d.cpp",
|
|
"prop_ess_entity_2d.cpp",
|
|
"prop_instance_job_2d.cpp",
|
|
"prop_instance_prop_job_2d.cpp",
|
|
|
|
"prop_scene_instance_2d.cpp",
|
|
|
|
"singleton/prop_utils_2d.cpp",
|
|
"singleton/prop_cache_2d.cpp",
|
|
|
|
"editor/prop_editor_plugin_2d.cpp",
|
|
|
|
"prop_mesher_2d.cpp",
|
|
|
|
"jobs/prop_texture_job_2d.cpp",
|
|
|
|
"jobs/prop_mesher_job_step_2d.cpp",
|
|
|
|
"material_cache/prop_material_cache_2d.cpp"
|
|
]
|
|
|
|
if version.minor >= 4:
|
|
sources.append("props/prop_data_portal_2d.cpp")
|
|
|
|
if has_texture_packer:
|
|
sources.append("material_cache/prop_material_cache_pcm_2d.cpp")
|
|
|
|
if ARGUMENTS.get('custom_modules_shared', 'no') == 'yes':
|
|
# Shared lib compilation
|
|
module_env.Append(CCFLAGS=['-fPIC'])
|
|
module_env['LIBS'] = []
|
|
shared_lib = module_env.SharedLibrary(target='#bin/props', 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)
|
|
|