mirror of
https://github.com/Relintai/pmlpp.git
synced 2024-12-21 14:56:47 +01:00
Added support for building the module as a shared library.
This commit is contained in:
parent
ee78d8ae72
commit
19685c2762
12
SCsub
12
SCsub
@ -121,5 +121,15 @@ if module_env.pmlpp_build_tests and module_env.pmlpp_build_old_classes:
|
||||
"test/mlpp_tests_old.cpp",
|
||||
]
|
||||
|
||||
module_env.add_source_files(env.modules_sources, sources)
|
||||
|
||||
if ARGUMENTS.get('pmlpp_shared', 'no') == 'yes':
|
||||
# Shared lib compilation
|
||||
module_env.Append(CCFLAGS=['-fPIC'])
|
||||
module_env['LIBS'] = []
|
||||
shared_lib = module_env.SharedLibrary(target='#bin/pmlpp', 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