view libsdl-ttf.md @ 62:c11f18adb87f default tip @

libjansson: fix CMake installation for release
author David Demelier <markand@malikania.fr>
date Fri, 10 Mar 2023 14:28:09 +0100
parents bfd88ff3c3aa
children
line wrap: on
line source

Build libsdl-ttf
================

Version: 2.20.2

Dependencies
------------

- libsdl
- libfreetype

Download
--------

- https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.20.2/SDL2_ttf-2.20.2.tar.gz

Patch
-----

We need to adjust `PKG_PREFIX` because it install CMake files in the wrong
location.

	patch -p1 < libsdl-ttf/patch-CMakeLists.txt.patch

Configure
---------

### Visual Studio (debug)

	cmake -S . -B build
		-DCMAKE_BUILD_TYPE=Debug
		-DCMAKE_INSTALL_PREFIX=C:/pkg/vs/debug
		-DBUILD_SHARED_LIBS=On
		-DSDL2TTF_VENDORED=Off
		-DSDL2TTF_SAMPLES=Off
		-G"NMake Makefiles"

### Visual Studio (release)

	cmake -S . -B build
		-DCMAKE_BUILD_TYPE=Release
		-DCMAKE_INSTALL_PREFIX=C:/pkg/vs/release
		-DBUILD_SHARED_LIBS=On
		-DSDL2TTF_VENDORED=Off
		-DSDL2TTF_SAMPLES=Off
		-G"NMake Makefiles"

Build
-----

### Visual Studio

	cmake --build build && cmake --install build

### For debug

	rmdir /s /q C:\pkg\vs\debug\share
	rmdir /s /q C:\pkg\vs\debug\lib\pkgconfig

### For release

	rmdir /s /q C:\pkg\vs\release\share
	rmdir /s /q C:\pkg\vs\release\lib\pkgconfig