2020-04-03 09:23:01 +02:00
|
|
|
import os
|
|
|
|
|
|
|
|
Import('env')
|
|
|
|
|
|
|
|
module_env = env.Clone()
|
|
|
|
|
2021-08-29 18:55:51 +02:00
|
|
|
import version
|
|
|
|
|
2020-04-03 09:23:01 +02:00
|
|
|
if os.path.isdir('../mesh_data_resource'):
|
|
|
|
module_env.Append(CPPDEFINES=['MESH_DATA_RESOURCE_PRESENT'])
|
|
|
|
|
2021-08-09 13:13:21 +02:00
|
|
|
has_texture_packer = False
|
|
|
|
|
2020-04-06 22:53:09 +02:00
|
|
|
if os.path.isdir('../texture_packer'):
|
2021-08-09 13:13:21 +02:00
|
|
|
has_texture_packer = True
|
2020-04-06 22:53:09 +02:00
|
|
|
module_env.Append(CPPDEFINES=['TEXTURE_PACKER_PRESENT'])
|
|
|
|
|
2021-04-24 17:39:51 +02:00
|
|
|
if os.path.isdir('../terraman'):
|
|
|
|
module_env.Append(CPPDEFINES=['TERRAMAN_PRESENT'])
|
|
|
|
|
2021-04-24 19:32:47 +02:00
|
|
|
if os.path.isdir('../mesh_utils'):
|
|
|
|
module_env.Append(CPPDEFINES=['MESH_UTILS_PRESENT'])
|
|
|
|
|
2021-04-24 22:01:28 +02:00
|
|
|
|
|
|
|
if os.path.isdir('../thread_pool'):
|
|
|
|
module_env.Append(CPPDEFINES=['THREAD_POOL_PRESENT'])
|
|
|
|
|
2020-04-03 09:23:01 +02:00
|
|
|
sources = [
|
|
|
|
|
|
|
|
"register_types.cpp",
|
|
|
|
|
2021-08-11 17:10:41 +02:00
|
|
|
"lights/prop_light.cpp",
|
|
|
|
|
2021-08-16 17:44:28 +02:00
|
|
|
"tiled_wall/tiled_wall.cpp",
|
|
|
|
"tiled_wall/tiled_wall_data.cpp",
|
|
|
|
|
2020-06-27 17:03:29 +02:00
|
|
|
"props/prop_data.cpp",
|
2020-07-06 22:22:58 +02:00
|
|
|
"props/prop_data_entry.cpp",
|
2020-06-27 17:03:29 +02:00
|
|
|
"props/prop_data_scene.cpp",
|
|
|
|
"props/prop_data_light.cpp",
|
|
|
|
"props/prop_data_prop.cpp",
|
2021-08-18 18:06:09 +02:00
|
|
|
"props/prop_data_tiled_wall.cpp",
|
2020-06-27 17:03:29 +02:00
|
|
|
|
2020-04-03 09:23:01 +02:00
|
|
|
"clutter/ground_clutter.cpp",
|
|
|
|
"clutter/ground_clutter_foliage.cpp",
|
|
|
|
|
2020-04-03 12:00:02 +02:00
|
|
|
"prop_instance.cpp",
|
2021-04-27 16:47:46 +02:00
|
|
|
"prop_instance_merger.cpp",
|
2020-04-03 13:45:55 +02:00
|
|
|
"prop_ess_entity.cpp",
|
2021-04-24 22:01:28 +02:00
|
|
|
"prop_instance_job.cpp",
|
2021-04-26 16:29:53 +02:00
|
|
|
"prop_instance_prop_job.cpp",
|
2020-06-27 22:29:19 +02:00
|
|
|
|
2020-07-06 22:02:22 +02:00
|
|
|
"prop_scene_instance.cpp",
|
|
|
|
|
2020-06-27 22:29:19 +02:00
|
|
|
"singleton/prop_utils.cpp",
|
2021-08-09 15:57:21 +02:00
|
|
|
"singleton/prop_cache.cpp",
|
2020-06-27 23:13:26 +02:00
|
|
|
|
|
|
|
"editor/prop_editor_plugin.cpp",
|
2021-04-24 17:39:51 +02:00
|
|
|
|
|
|
|
"prop_mesher.cpp",
|
2021-04-24 19:32:47 +02:00
|
|
|
|
2021-05-17 22:27:10 +02:00
|
|
|
"jobs/prop_texture_job.cpp",
|
|
|
|
|
2021-08-09 11:23:40 +02:00
|
|
|
"jobs/prop_mesher_job_step.cpp",
|
2021-08-09 13:13:21 +02:00
|
|
|
|
|
|
|
"material_cache/prop_material_cache.cpp"
|
2020-04-03 09:23:01 +02:00
|
|
|
]
|
|
|
|
|
2021-08-29 18:55:51 +02:00
|
|
|
if version.minor >= 4:
|
|
|
|
sources.append("props/prop_data_portal.cpp")
|
|
|
|
|
2021-08-09 13:13:21 +02:00
|
|
|
if has_texture_packer:
|
|
|
|
sources.append("material_cache/prop_material_cache_pcm.cpp")
|
|
|
|
|
2020-04-03 09:23:01 +02:00
|
|
|
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)
|
|
|
|
|