From d8ea96198525c4d733b5772ad8f0288cdb7c156e Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 19 Nov 2018 15:59:45 +0100 Subject: [PATCH] build: autodetect if cxx bindings or mono is build if it is - build the examples, if not - don't add the examples to the subprojects that are build. --- setup.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 11b1df0b..59d25967 100755 --- a/setup.py +++ b/setup.py @@ -1,12 +1,22 @@ #!/usr/bin/python3 import os +import subprocess from string import Template -supported_languages = ["c", "csharp", "cxx"] +supported_languages = ["c"] directories = ["apps", "reference", "tutorial"] # "examples", "legacy-examples" goals = [] subprojects = [] +if subprocess.call("pkg-config --exists efl-mono", shell=True) == 0: + supported_languages += ["csharp"] +else: + print("Disable c# bindings") +if subprocess.call("pkg-config --exists eina-cxx", shell=True) == 0: + supported_languages += ["cxx"] +else: + print("Disable c++ bindings") + class SubProjectGoal: def __init__(self, language, path): self.language = language