mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-25 05:11:49 +00:00
aedi: use cmake to build sdl2_ttf
This commit is contained in:
parent
b7a948c1f5
commit
6159a1b6e3
1 changed files with 8 additions and 2 deletions
|
@ -325,18 +325,24 @@ class Sdl2NetTarget(ConfigureMakeStaticDependencyTarget):
|
|||
return os.path.exists(state.source + 'SDL2_net.pc.in')
|
||||
|
||||
|
||||
class Sdl2TtfTarget(ConfigureMakeStaticDependencyTarget):
|
||||
class Sdl2TtfTarget(CMakeStaticDependencyTarget):
|
||||
def __init__(self, name='sdl2_ttf'):
|
||||
super().__init__(name)
|
||||
self.options['VERSION'] = '2.0.15'
|
||||
|
||||
def prepare_source(self, state: BuildState):
|
||||
state.download_source(
|
||||
'https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.15.tar.gz',
|
||||
'a9eceb1ad88c1f1545cd7bd28e7cbc0b2c14191d40238f531a15b01b1b22cd33')
|
||||
'a9eceb1ad88c1f1545cd7bd28e7cbc0b2c14191d40238f531a15b01b1b22cd33',
|
||||
patches='sdl2_ttf-fix-cmake')
|
||||
|
||||
def detect(self, state: BuildState) -> bool:
|
||||
return os.path.exists(state.source + 'SDL2_ttf.pc.in')
|
||||
|
||||
def post_build(self, state: BuildState):
|
||||
super().post_build(state)
|
||||
shutil.move(state.install_path + 'SDL2_ttf.framework/Resources', state.install_path + 'lib/cmake/SDL2_ttf')
|
||||
|
||||
@staticmethod
|
||||
def _process_pkg_config(pcfile: str, line: str) -> str:
|
||||
return line + 'Requires.private: freetype2\n' if line.startswith('Requires:') else line
|
||||
|
|
Loading…
Reference in a new issue