Added SModule and dependencies.json for S++ 2.0 support.
This commit is contained in:
parent
9ef450df33
commit
efedca0d3c
40
SModule
Normal file
40
SModule
Normal file
@ -0,0 +1,40 @@
|
||||
|
||||
import json
|
||||
|
||||
|
||||
Import('env')
|
||||
|
||||
mijin_sources = Split("""
|
||||
source/mijin/async/coroutine.cpp
|
||||
source/mijin/debug/stacktrace.cpp
|
||||
source/mijin/debug/symbol_info.cpp
|
||||
source/mijin/io/process.cpp
|
||||
source/mijin/io/stream.cpp
|
||||
source/mijin/util/os.cpp
|
||||
source/mijin/types/name.cpp
|
||||
source/mijin/virtual_filesystem/filesystem.cpp
|
||||
source/mijin/virtual_filesystem/stacked.cpp
|
||||
""")
|
||||
|
||||
with open('dependencies.json', 'r') as f:
|
||||
dependencies = env.DepsFromJson(json.load(f))
|
||||
|
||||
cppdefines = []
|
||||
if env['BUILD_TYPE'] == 'debug':
|
||||
cppdefines += ['MIJIN_DEBUG=1', 'MIJIN_CHECKED_ITERATORS=1']
|
||||
|
||||
|
||||
lib_mijin = env.UnityStaticLibrary(
|
||||
target = env['LIB_DIR'] + '/mijin',
|
||||
source = mijin_sources,
|
||||
dependencies = dependencies,
|
||||
CPPDEFINES = list(env['CPPDEFINES']) + cppdefines
|
||||
)
|
||||
|
||||
LIB_CONFIG = {
|
||||
'CPPPATH': [env.Dir('source')],
|
||||
'CPPDEFINES': cppdefines,
|
||||
'LIBS': [lib_mijin]
|
||||
}
|
||||
|
||||
Return('LIB_CONFIG')
|
6
dependencies.json
Normal file
6
dependencies.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"libbacktrace":
|
||||
{
|
||||
"condition": "compiler_family == 'gcc' or compiler_family == 'clang'"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user