rcpp_framework/database/sqlite/detect.py

59 lines
1.1 KiB
Python
Raw Normal View History

2020-11-28 14:30:50 +01:00
import os
import platform
import sys
def is_active():
return True
def get_name():
return "pgsql"
def can_build():
# if os.name == "posix" or sys.platform == "darwin":
# x11_error = os.system("pkg-config --version > /dev/null")
# if x11_error:
# return False
2020-11-28 14:30:50 +01:00
# sqlite_error = os.system("pkg-config sqlite3 --modversion --silence-errors > /dev/null ")
2020-11-28 14:30:50 +01:00
# if sqlite_error:
# print("sqlite3 not found!")
# return False
2020-11-28 14:30:50 +01:00
# print("sqlite3 found!")
2020-11-28 14:30:50 +01:00
# return True
2020-11-28 14:30:50 +01:00
# #todo
# return False
2020-11-28 14:30:50 +01:00
print("sqlite3 built in!")
return True
2020-11-28 14:30:50 +01:00
def get_opts():
from SCons.Variables import BoolVariable, EnumVariable
return [
# EnumVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", "yes", ("yes", "no")),
2020-11-28 14:30:50 +01:00
]
def get_flags():
return []
def configure(env):
#env.ParseConfig("pkg-config sqlite3 --cflags --libs")
2020-11-28 14:30:50 +01:00
2020-11-28 14:51:42 +01:00
env.Append(CPPDEFINES=["SQLITE_PRESENT"])
2020-11-28 14:30:50 +01:00
# Link those statically for portability
#if env["use_static_cpp"]:
#env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"])