2021-06-17 14:43:29 +02:00
|
|
|
import os
|
|
|
|
import platform
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
|
|
def is_active():
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
def get_name():
|
|
|
|
return "drogon"
|
|
|
|
|
|
|
|
|
|
|
|
def can_build():
|
|
|
|
if os.name == "posix" or sys.platform == "darwin":
|
|
|
|
err = os.system("pkg-config --version > /dev/null")
|
|
|
|
if err:
|
|
|
|
return False
|
|
|
|
|
|
|
|
err = os.system("pkg-config uuid --modversion --silence-errors > /dev/null ")
|
|
|
|
|
|
|
|
if err:
|
|
|
|
print("Package uuid not found..")
|
|
|
|
return False
|
|
|
|
|
|
|
|
err = os.system("pkg-config jsoncpp --modversion --silence-errors > /dev/null ")
|
|
|
|
|
|
|
|
if err:
|
|
|
|
print("Package jsoncpp not found..")
|
|
|
|
return False
|
|
|
|
|
|
|
|
err = os.system("pkg-config libcares --modversion --silence-errors > /dev/null ")
|
|
|
|
|
|
|
|
if err:
|
|
|
|
print("Package libcares not found..")
|
|
|
|
return False
|
|
|
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
def get_opts():
|
|
|
|
return []
|
|
|
|
|
|
|
|
def get_flags():
|
|
|
|
|
|
|
|
return []
|
|
|
|
|
|
|
|
|
|
|
|
def configure(env):
|
|
|
|
err = os.system("pkg-config uuid --modversion --silence-errors > /dev/null ")
|
|
|
|
|
|
|
|
if not err:
|
|
|
|
env.ParseConfig("pkg-config uuid --cflags --libs")
|
|
|
|
|
|
|
|
err = os.system("pkg-config jsoncpp --modversion --silence-errors > /dev/null ")
|
|
|
|
|
|
|
|
if not err:
|
|
|
|
env.ParseConfig("pkg-config jsoncpp --cflags --libs")
|
|
|
|
|
|
|
|
err = os.system("pkg-config libcares --modversion --silence-errors > /dev/null ")
|
|
|
|
|
|
|
|
if not err:
|
|
|
|
env.ParseConfig("pkg-config libcares --cflags --libs")
|
2021-06-20 15:14:25 +02:00
|
|
|
|
2021-08-04 23:27:18 +02:00
|
|
|
err = os.system("pkg-config zlib --modversion --silence-errors > /dev/null ")
|
|
|
|
|
|
|
|
if not err:
|
|
|
|
env.ParseConfig("pkg-config zlib --cflags --libs")
|
2021-06-20 15:14:25 +02:00
|
|
|
|
2021-08-04 23:27:18 +02:00
|
|
|
err = os.system("pkg-config openssl --modversion --silence-errors > /dev/null ")
|
|
|
|
|
2021-06-20 15:14:25 +02:00
|
|
|
if not err:
|
|
|
|
env.ParseConfig("pkg-config openssl --cflags --libs")
|
|
|
|
env.Append(CPPDEFINES=["OPENSSL_FOUND"])
|
2021-11-20 19:20:32 +01:00
|
|
|
env.Append(CPPDEFINES=["USE_OPENSSL"])
|
|
|
|
|
2021-06-20 15:14:25 +02:00
|
|
|
|
2022-02-05 16:27:15 +01:00
|
|
|
env.Append(CPPPATH=["#web_backends/drogon/drogon/lib/inc"])
|
|
|
|
env.Append(CPPPATH=["#web_backends/drogon"])
|
2021-06-17 14:43:29 +02:00
|
|
|
|
2022-02-05 16:27:15 +01:00
|
|
|
env.Append(CPPPATH=["#web_backends/drogon/trantor"])
|
2022-02-12 10:42:45 +01:00
|
|
|
env.Append(CPPPATH=["#web_backends/drogon/trantor/net"])
|
|
|
|
env.Append(CPPPATH=["#web_backends/drogon/trantor/net/inner"])
|
2022-02-05 16:27:15 +01:00
|
|
|
env.Append(CPPPATH=["#web_backends/drogon/trantor/utils"])
|
2021-08-04 23:27:18 +02:00
|
|
|
|
|
|
|
env.Append(LINKFLAGS=["-ldl"])
|
2021-06-17 14:43:29 +02:00
|
|
|
|