Skip to content

Commit

Permalink
pkgconfig: Make generate() a no-op for is_build_only
Browse files Browse the repository at this point in the history
Mainly to avoid clashes in meson-uninstalled, but also since we don't
want to install any .pc files.
  • Loading branch information
oleavr committed Mar 18, 2024
1 parent 8233fa6 commit e86fbf9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mesonbuild/modules/pkgconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,9 @@ def generate_libs_flags(libs: T.List[LIBS]) -> T.Iterable[str]:
def generate(self, state: ModuleState,
args: T.Tuple[T.Optional[T.Union[build.SharedLibrary, build.StaticLibrary]]],
kwargs: GenerateKw) -> ModuleReturnValue:
if state.is_build_only_subproject:
return ModuleReturnValue(None, [])

default_version = state.project_version
default_install_dir: T.Optional[str] = None
default_description: T.Optional[str] = None
Expand Down

0 comments on commit e86fbf9

Please sign in to comment.