Made nana a Scons++ module.
This commit is contained in:
parent
f510771686
commit
b5ad078f53
3
.gitignore
vendored
3
.gitignore
vendored
@ -50,3 +50,6 @@ cmake_install.cmake
|
|||||||
*.db
|
*.db
|
||||||
*.opendb
|
*.opendb
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
|
# objects
|
||||||
|
*.o
|
||||||
|
44
SModule
Normal file
44
SModule
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
|
Import('env')
|
||||||
|
|
||||||
|
nana_sources = []
|
||||||
|
nana_sources += Glob('source/*.cpp')
|
||||||
|
nana_sources += Glob('source/detail/*.cpp')
|
||||||
|
nana_sources += Glob('source/detail/posix/*.cpp')
|
||||||
|
nana_sources += Glob('source/filesystem/*.cpp')
|
||||||
|
nana_sources += Glob('source/gui/*.cpp')
|
||||||
|
nana_sources += Glob('source/gui/detail/*.cpp')
|
||||||
|
nana_sources += Glob('source/gui/widgets/*.cpp')
|
||||||
|
nana_sources += Glob('source/gui/widgets/skeletons/*.cpp')
|
||||||
|
nana_sources += Glob('source/paint/*.cpp')
|
||||||
|
nana_sources += Glob('source/paint/detail/*.cpp')
|
||||||
|
nana_sources += Glob('source/system/*.cpp')
|
||||||
|
nana_sources += Glob('source/threads/*.cpp')
|
||||||
|
|
||||||
|
with open('dependencies.json', 'r') as f:
|
||||||
|
dependencies = env.DepsFromJson(json.load(f))
|
||||||
|
|
||||||
|
|
||||||
|
cppflags = []
|
||||||
|
if env['COMPILER_FAMILY'] == 'gcc':
|
||||||
|
cppflags += ['-Wno-changes-meaning', '-Wno-deprecated-declarations', '-Wno-deprecated-copy'] # TODO: get rid of these
|
||||||
|
|
||||||
|
lib_nana = env.UnityStaticLibrary(
|
||||||
|
CXXFLAGS = env['CXXFLAGS'] + cppflags,
|
||||||
|
CPPPATH = env['CPPPATH'] + [env.Dir('include')],
|
||||||
|
target = env['LIB_DIR'] + '/nana',
|
||||||
|
source = nana_sources,
|
||||||
|
dependencies = dependencies,
|
||||||
|
# CPPDEFINES = list(env['CPPDEFINES']) + cppdefines
|
||||||
|
)
|
||||||
|
|
||||||
|
LIB_CONFIG = {
|
||||||
|
'CPPPATH': [env.Dir('include')],
|
||||||
|
# 'CPPDEFINES': cppdefines,
|
||||||
|
'LIBS': [lib_nana]
|
||||||
|
}
|
||||||
|
|
||||||
|
Return('LIB_CONFIG')
|
10
dependencies.json
Normal file
10
dependencies.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"X11":
|
||||||
|
{
|
||||||
|
"condition": "target_os == 'posix'"
|
||||||
|
},
|
||||||
|
"Xft":
|
||||||
|
{
|
||||||
|
"condition": "target_os == 'posix'"
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user