aboutsummaryrefslogtreecommitdiff
path: root/modules/gnome.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-08-19 21:55:04 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-08-19 21:55:04 +0300
commit60ff47f7361f0a92f4e852e3caa2e1ff5fc31191 (patch)
tree4055b8721d03270e4fac78c24ac2fdb9936d3c9c /modules/gnome.py
parent63572626c69fc888b6fa94d00cf1bfcb7bb3c652 (diff)
downloadmeson-60ff47f7361f0a92f4e852e3caa2e1ff5fc31191.zip
meson-60ff47f7361f0a92f4e852e3caa2e1ff5fc31191.tar.gz
meson-60ff47f7361f0a92f4e852e3caa2e1ff5fc31191.tar.bz2
Can specify gtk-doc search dirs with include_directories. Closes #231.
Diffstat (limited to 'modules/gnome.py')
-rw-r--r--modules/gnome.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/gnome.py b/modules/gnome.py
index fc3f408..f4a80ab 100644
--- a/modules/gnome.py
+++ b/modules/gnome.py
@@ -208,10 +208,20 @@ class GnomeModule:
src_dir = kwargs['src_dir']
targetname = modulename + '-doc'
command = os.path.normpath(os.path.join(os.path.split(__file__)[0], "../gtkdochelper.py"))
+ if hasattr(src_dir, 'held_object'):
+ src_dir= src_dir.held_object
+ if not isinstance(src_dir, build.IncludeDirs):
+ raise MesonException('Invalidt keyword argument for src_dir.')
+ incdirs = src_dir.get_incdirs()
+ if len(incdirs) != 1:
+ raise MesonException('Argument src_dir has more than one directory specified.')
+ header_dir = os.path.join(state.environment.get_source_dir(), src_dir.get_curdir(), incdirs[0])
+ else:
+ header_dir = os.path.normpath(os.path.join(state.subdir, src_dir))
args = [state.environment.get_source_dir(),
state.environment.get_build_dir(),
state.subdir,
- os.path.normpath(os.path.join(state.subdir, src_dir)),
+ header_dir,
main_file,
modulename]
res = [build.RunTarget(targetname, command, args, state.subdir)]