diff options
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index ede0ef7..a167c46 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1822,10 +1822,12 @@ rule FORTRAN_DEP_HACK # and from `include_directories:` of internal deps of the target. # # Target include dirs should override internal deps include dirs. + # This is handled in BuildTarget.process_kwargs() # # Include dirs from internal deps should override include dirs from - # external deps. - for i in target.get_include_dirs(): + # external deps and must maintain the order in which they are specified. + # Hence, we must reverse the list so that the order is preserved. + for i in reversed(target.get_include_dirs()): basedir = i.get_curdir() for d in i.get_incdirs(): # Avoid superfluous '/.' at the end of paths when d is '.' |