From ffd1f7eb681744137cd599c7025b20422a987fd3 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 5 Feb 2022 16:36:27 +0100 Subject: [PATCH] Created database_modules folder again, and moved db_settings from the core to it. --- SConstruct | 1 + database_modules/db_settings/SCsub | 12 +++++++++ .../db_settings}/db_settings.cpp | 0 .../db_settings}/db_settings.h | 2 +- database_modules/db_settings/detect.py | 26 +++++++++++++++++++ 5 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 database_modules/db_settings/SCsub rename {core/settings => database_modules/db_settings}/db_settings.cpp (100%) rename {core/settings => database_modules/db_settings}/db_settings.h (91%) create mode 100644 database_modules/db_settings/detect.py diff --git a/SConstruct b/SConstruct index d555b03..e582651 100644 --- a/SConstruct +++ b/SConstruct @@ -227,6 +227,7 @@ if env_base["databases"]: modfol = env_base["module_folders"].split(";") modfol.append("modules") modfol.append("web_modules") +modfol.append("database_modules") #temporarily, these should be handled in a different pass modfol.append("backends") modfol.append("web_backends") diff --git a/database_modules/db_settings/SCsub b/database_modules/db_settings/SCsub new file mode 100644 index 0000000..f3a7fe0 --- /dev/null +++ b/database_modules/db_settings/SCsub @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +Import("env_mod") +Import("env") + +env_mod.core_sources = [] + +env_mod.add_source_files(env_mod.core_sources, "*.cpp") + +# Build it all as a library +lib = env_mod.add_library("db_settings", env_mod.core_sources) +env.Prepend(LIBS=[lib]) diff --git a/core/settings/db_settings.cpp b/database_modules/db_settings/db_settings.cpp similarity index 100% rename from core/settings/db_settings.cpp rename to database_modules/db_settings/db_settings.cpp diff --git a/core/settings/db_settings.h b/database_modules/db_settings/db_settings.h similarity index 91% rename from core/settings/db_settings.h rename to database_modules/db_settings/db_settings.h index 8291569..f3d0b3e 100644 --- a/core/settings/db_settings.h +++ b/database_modules/db_settings/db_settings.h @@ -1,7 +1,7 @@ #ifndef DB_SETTINGS_H #define DB_SETTINGS_H -#include "settings.h" +#include "core/settings/settings.h" class DBSettings : public Settings { RCPP_OBJECT(DBSettings, Settings); diff --git a/database_modules/db_settings/detect.py b/database_modules/db_settings/detect.py new file mode 100644 index 0000000..c85f967 --- /dev/null +++ b/database_modules/db_settings/detect.py @@ -0,0 +1,26 @@ +import os +import platform +import sys + + +def is_active(): + return True + + +def get_name(): + return "db_settings" + + +def can_build(): + return True + + +def get_opts(): + return [] + +def get_flags(): + + return [] + +def configure(env): + pass