diff --git a/.gitignore b/.gitignore index 003f80b0..c3beb2ec 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,6 @@ cmake_install.cmake *.db *.opendb .vscode + +# objects +*.o diff --git a/SModule b/SModule new file mode 100644 index 00000000..72e80d27 --- /dev/null +++ b/SModule @@ -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') diff --git a/dependencies.json b/dependencies.json new file mode 100644 index 00000000..a6031c9e --- /dev/null +++ b/dependencies.json @@ -0,0 +1,10 @@ +{ + "X11": + { + "condition": "target_os == 'posix'" + }, + "Xft": + { + "condition": "target_os == 'posix'" + } +}