From 1ca6e74187f4a0a7e1a0303914fba1ec6f672ed6 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 2 Aug 2021 10:54:06 +0300 Subject: [PATCH] aedi: enable creation of samplerate cmake modules --- aedi/target/library_tier2.py | 10 ++++++++++ deps/.gitignore | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/aedi/target/library_tier2.py b/aedi/target/library_tier2.py index b321f498..7de33780 100644 --- a/aedi/target/library_tier2.py +++ b/aedi/target/library_tier2.py @@ -432,6 +432,16 @@ class SamplerateTarget(CMakeStaticDependencyTarget): def detect(self, state: BuildState) -> bool: return state.has_source_file('samplerate.pc.in') + def post_build(self, state: BuildState): + super().post_build(state) + + def update_linker_flags(line: str): + link_var = ' INTERFACE_LINK_LIBRARIES ' + return None if line.startswith(link_var) else line + + cmake_module = state.install_path / 'lib/cmake/SampleRate/SampleRateTargets.cmake' + self.update_text_file(cmake_module, update_linker_flags) + class Sdl2Target(CMakeStaticDependencyTarget): def __init__(self, name='sdl2'): diff --git a/deps/.gitignore b/deps/.gitignore index bba3d458..5bd894cd 100644 --- a/deps/.gitignore +++ b/deps/.gitignore @@ -47,7 +47,6 @@ /png/bin/png-fix-itxt /png/bin/pngfix /samplerate/bin/ -/samplerate/lib/cmake/ /sdl2/include/SDL2/SDL_config_*.h /sdl2/include/SDL2/SDL_copying.h /sdl2/include/SDL2/SDL_test*.h