mirror of
https://github.com/Relintai/texture_packer.git
synced 2024-11-12 10:15:16 +01:00
The module can now be built as a shared library.
This commit is contained in:
parent
fbf5d0d634
commit
189810d164
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,4 +5,4 @@
|
||||
*.pyc
|
||||
*.obj
|
||||
*.bc
|
||||
|
||||
*.os
|
||||
|
35
SCsub
35
SCsub
@ -1,16 +1,35 @@
|
||||
import os
|
||||
|
||||
Import('env')
|
||||
|
||||
env.add_source_files(env.modules_sources,"register_types.cpp")
|
||||
module_env = env.Clone()
|
||||
|
||||
env.add_source_files(env.modules_sources,"texture_packer.cpp")
|
||||
env.add_source_files(env.modules_sources,"rectpack2D/pack.cpp")
|
||||
sources = [
|
||||
"register_types.cpp",
|
||||
|
||||
env.add_source_files(env.modules_sources,"texture_merger.cpp")
|
||||
"texture_packer.cpp",
|
||||
"rectpack2D/pack.cpp",
|
||||
|
||||
env.add_source_files(env.modules_sources,"texture_resource/packer_image_resource.cpp")
|
||||
"texture_merger.cpp",
|
||||
|
||||
env.add_source_files(env.modules_sources,"texture_resource/editor_plugin_packer_image_resource.cpp")
|
||||
env.add_source_files(env.modules_sources,"texture_resource/packer_image_resource_importer.cpp")
|
||||
"texture_resource/packer_image_resource.cpp",
|
||||
|
||||
env.add_source_files(env.modules_sources,"layers/texture_layer_merger.cpp")
|
||||
"texture_resource/editor_plugin_packer_image_resource.cpp",
|
||||
"texture_resource/packer_image_resource_importer.cpp",
|
||||
|
||||
"layers/texture_layer_merger.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/texture_packer', 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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user