[jhbuild/wip/hadess/cmake-transmission] make: Add cmake detection for unknown modules
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild/wip/hadess/cmake-transmission] make: Add cmake detection for unknown modules
- Date: Wed, 23 Mar 2022 19:22:45 +0000 (UTC)
commit 5a584888d1ccf790e43878acadedd7733bd2ee16
Author: Bastien Nocera <hadess hadess net>
Date: Sat Mar 5 13:43:54 2022 +0100
make: Add cmake detection for unknown modules
Assume that unknown modules with a "CMakeLists.txt" file can be built
using cmake.
jhbuild/commands/make.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/jhbuild/commands/make.py b/jhbuild/commands/make.py
index d44fa5be..5a0a0cfe 100644
--- a/jhbuild/commands/make.py
+++ b/jhbuild/commands/make.py
@@ -88,7 +88,8 @@ class cmd_make(Command):
logging.error(_('No module matching current directory %r in the moduleset') % (modname, ))
return False
- # Try distutils, then meson, then autotools
+ # Try distutils, then meson, then autotools (if autogen.sh exists), then
+ # cmake and fallback to autotools
if os.path.exists(os.path.join(self.get_cwd(), 'setup.py')):
from jhbuild.modtypes.distutils import DistutilsModule
module = DistutilsModule(modname, default_repo.branch(modname))
@@ -96,6 +97,12 @@ class cmd_make(Command):
elif os.path.exists(os.path.join(self.get_cwd(), 'meson.build')):
from jhbuild.modtypes.meson import MesonModule
module = MesonModule(modname, default_repo.branch(modname))
+ elif os.path.exists(os.path.join(self.get_cwd(), 'autogen.sh')):
+ from jhbuild.modtypes.autotools import AutogenModule
+ module = AutogenModule(modname, default_repo.branch(modname))
+ elif os.path.exists(os.path.join(self.get_cwd(), 'CMakeLists.txt')):
+ from jhbuild.modtypes.cmake import CMakeModule
+ module = CMakeModule(modname, default_repo.branch(modname))
else:
from jhbuild.modtypes.autotools import AutogenModule
module = AutogenModule(modname, default_repo.branch(modname))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]