From 19f732c4ee7ee24251594e861f751e09f19d5c96 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Wed, 15 Feb 2017 16:48:59 +0100 Subject: [PATCH] automate the task of including all the necessary files for openmw --- docs/source/conf.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 6916a1551..fe7b72d8b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -51,10 +51,12 @@ except ImportError: # Where breathe can find the source files openmw_path = os.path.join(project_root, "apps", "openmw") -openmw_headers = insensitive_glob(os.path.join(openmw_path, "*.hpp")) + \ - insensitive_glob(os.path.join(openmw_path, "mwbase", "*.hpp")) + \ - insensitive_glob(os.path.join(openmw_path, "mwclass", "*.hpp")) +openmw_sub_dirs = os.walk(openmw_path).next()[1] +openmw_headers = insensitive_glob(os.path.join(openmw_path, "*.hpp")) +for dir in openmw_sub_dirs: + openmw_headers += insensitive_glob(os.path.join(openmw_path, dir, "*.hpp")) +# massage the headers to get the relative path needed openmw_headers = [os.path.relpath(x, openmw_path) for x in openmw_headers] breathe_projects_source = {