view libpng.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 b1a6e59a4869
children
line wrap: on
line source

Build libpng
============

Version: 1.6.39

Download
--------

- http://prdownloads.sourceforge.net/libpng/libpng-1.6.39.tar.gz

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

- [CMake](https://cmake.org).
- libz

Configure
---------

### Visual Studio (debug)

	cmake -S . -B build
		-DCMAKE_BUILD_TYPE=Debug
		-DCMAKE_INSTALL_PREFIX=C:/pkg/vs/debug
		-DBUILD_SHARED_LIBS=On
		-DPNG_EXECUTABLES=Off
		-DPNG_TESTS=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
		-DPNG_EXECUTABLES=Off
		-DPNG_TESTS=Off
		-G"NMake Makefiles"

Build
-----

CMake files are invalid (missing targets) so we drop them in favor of FindPNG
native CMake module.

### Visual Studio

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

### For debug

	rmdir /S /Q C:\pkg\vs\debug\lib\libpng
	rmdir /S /Q C:\pkg\vs\debug\share

### For release

	rmdir /S /Q C:\pkg\vs\release\lib\libpng
	rmdir /S /Q C:\pkg\vs\release\share