From 854055013893c9c35b18e939f946c1f816219d61 Mon Sep 17 00:00:00 2001 From: Patrick Wuttke Date: Sun, 2 Mar 2025 21:36:46 +0100 Subject: [PATCH] Added module config to include RAID as a module in another project. --- SModule | 6 ++++++ dependencies.json | 16 ++++++++++++++++ private/raid/SModule | 22 ++++++---------------- 3 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 SModule create mode 100644 dependencies.json diff --git a/SModule b/SModule new file mode 100644 index 0000000..b3f4c20 --- /dev/null +++ b/SModule @@ -0,0 +1,6 @@ + +Import('env') + +env = env.Module('private/raid/SModule') + +Return('env') diff --git a/dependencies.json b/dependencies.json new file mode 100644 index 0000000..4401aa3 --- /dev/null +++ b/dependencies.json @@ -0,0 +1,16 @@ +{ + "fmt": {}, + "mijin": {}, + "imgui": { + "options": { + "docking": true, + "backends": [ + "sdl3", + "opengl3" + ] + } + }, + "SDL": { + "min": [3,0,0] + } +} diff --git a/private/raid/SModule b/private/raid/SModule index 31e1a2b..cc10f8f 100644 --- a/private/raid/SModule +++ b/private/raid/SModule @@ -1,30 +1,20 @@ +import json + Import('env') src_files = Split(""" application.cpp """) +with open('../../dependencies.json', 'r') as f: + dependencies = env.DepsFromJson(json.load(f)) + lib_raid = env.UnityStaticLibrary( name = 'RAID', target = env['LIB_DIR'] + '/raid', source = src_files, - dependencies = { - 'fmt': {}, - 'mijin': {}, - 'imgui': { - 'options': { - 'docking': True, - 'backends': [ - 'sdl3', - 'opengl3' - ] - } - }, - 'SDL': { - 'min': (3,0,0) - } - } + dependencies = dependencies ) env.Default(lib_raid)