view libsdl-mixer.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 5ea6e92e1876
children
line wrap: on
line source

Build libsdl-mixer
==================

Version: 2.6.3

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

- libsdl
- libvorbis

Download
--------

- https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.6.3/SDL2_mixer-2.6.3.tar.gz

Patch
-----

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

	patch -p1 < libsdl-mixer/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
		-DSDL2MIXER_DEPS_SHARED=Off
		-DSDL2MIXER_FLAC=Off
		-DSDL2MIXER_MIDI=Off
		-DSDL2MIXER_MOD=Off
		-DSDL2MIXER_MP3=Off
		-DSDL2MIXER_OPUS=Off
		-DSDL2MIXER_SAMPLES=Off
		-DSDL2MIXER_VENDORED=Off
		-DSDL2MIXER_VORBIS="VORBISFILE"
		-DSDL2MIXER_VORBIS_VORBISFILE_SHARED=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
		-DSDL2MIXER_DEPS_SHARED=Off
		-DSDL2MIXER_FLAC=Off
		-DSDL2MIXER_MIDI=Off
		-DSDL2MIXER_MOD=Off
		-DSDL2MIXER_MP3=Off
		-DSDL2MIXER_OPUS=Off
		-DSDL2MIXER_SAMPLES=Off
		-DSDL2MIXER_VENDORED=Off
		-DSDL2MIXER_VORBIS="VORBISFILE"
		-DSDL2MIXER_VORBIS_VORBISFILE_SHARED=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