aedi: avoid absolute path in png cmake module

This commit is contained in:
alexey.lysiuk 2022-08-08 12:57:42 +03:00
parent e05e59c2a9
commit 1b5c2d3229
1 changed files with 6 additions and 0 deletions

View File

@ -177,6 +177,12 @@ class PngTarget(CMakeStaticDependencyTarget):
def post_build(self, state: BuildState):
super().post_build(state)
def update_cmake_libs(line: str):
link_libs = ' INTERFACE_LINK_LIBRARIES '
return f'{link_libs}"ZLIB::ZLIB"\n' if line.startswith(link_libs) else line
self.update_text_file(state.install_path / 'lib/libpng/libpng16.cmake', update_cmake_libs)
self.update_config_script(state.install_path / 'bin/libpng16-config')