meson: Correctly pass the global include to the compiler
It's not safe to assume `-include config.h` works, since this depends on the functionality of the compiler that the cwd when running the compiler is searched first. When libcamera is included as a Meson subproject, the cwd of the compiler is the cwd of the main project, not of libcamera's build dir, and thus cannot be found. Instead, pass the include filename as a path based on the current build dir. Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Laurent Pinchart
parent
ed12bb4aba
commit
ba6435930f
@@ -44,7 +44,7 @@ endif
|
||||
|
||||
common_arguments = [
|
||||
'-Wshadow',
|
||||
'-include', 'config.h',
|
||||
'-include', meson.current_build_dir() / 'config.h',
|
||||
]
|
||||
|
||||
c_arguments = []
|
||||
|
||||
Reference in New Issue
Block a user