mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2025-02-20 15:14:26 +01:00
Now database support is disable dby default, and can be enabled by passing databases=yes to the engine's build script.
This commit is contained in:
parent
0b8dcea37a
commit
f31052ff76
@ -80,6 +80,7 @@ opts.Add(EnumVariable("target", "Compilation target", "debug", ("debug", "releas
|
||||
opts.Add("folders", "App folders to compile", "")
|
||||
opts.Add("main_file", "The main file", "")
|
||||
opts.Add("module_folders", "App module folders to compile", "")
|
||||
opts.Add("databases", "Whether to have database support", False)
|
||||
|
||||
# Compilation environment setup
|
||||
opts.Add("CXX", "C++ compiler")
|
||||
@ -110,9 +111,11 @@ scons_ver = env_base._get_major_minor_revision(scons_raw_version)
|
||||
if scons_ver >= (4, 0, 0):
|
||||
env_base.Tool("compilation_db")
|
||||
|
||||
|
||||
database_list = []
|
||||
|
||||
if env_base["databases"]:
|
||||
env_base.Append(CPPDEFINES=["DATABASES_ENABLED"])
|
||||
|
||||
for x in sorted(glob.glob("database/*")):
|
||||
if not os.path.isdir(x) or not os.path.exists(x + "/detect.py"):
|
||||
continue
|
||||
@ -177,6 +180,7 @@ Export("env")
|
||||
|
||||
SConscript("core/SCsub")
|
||||
|
||||
if env_base["databases"]:
|
||||
for d in database_list:
|
||||
tmppath = "./database/" + d
|
||||
sys.path.insert(0, tmppath)
|
||||
|
@ -62,6 +62,11 @@ def configure(env):
|
||||
if not err:
|
||||
env.ParseConfig("pkg-config libcares --cflags --libs")
|
||||
|
||||
err = os.system("pkg-config zlib --modversion --silence-errors > /dev/null ")
|
||||
|
||||
if not err:
|
||||
env.ParseConfig("pkg-config zlib --cflags --libs")
|
||||
|
||||
err = os.system("pkg-config openssl --modversion --silence-errors > /dev/null ")
|
||||
|
||||
if not err:
|
||||
@ -76,3 +81,5 @@ def configure(env):
|
||||
env.Prepend(CPPPATH=["#modules/drogon/trantor/net/inner"])
|
||||
env.Prepend(CPPPATH=["#modules/drogon/trantor/utils"])
|
||||
|
||||
env.Append(LINKFLAGS=["-ldl"])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user