-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSCsub
26 lines (19 loc) · 810 Bytes
/
SCsub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Import('env')
env.Append(LIBS=["yaml-cpp", "lmdb", "dsmap", "lz4", "tbb"])
module_env = env.Clone()
module_env.Append(CCFLAGS=['-fexceptions', '--std=c++20'])
includes = Glob('**/include') + ['.']
module_env.Append(CPPPATH=includes)
sources = Glob('**/*.cpp')
sources = [file for file in sources if file.name != "test.cpp"] + ['register_types.cpp']
if ARGUMENTS.get('pgvoxel_shared', 'no') == 'yes':
# Shared lib compilation
module_env.Append(CCFLAGS=['-fPIC'])
module_env['LIBS'] = []
shared_lib = module_env.SharedLibrary(target='#bin/pgvoxel', 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)