mirror of
				https://github.com/facebook/zstd.git
				synced 2025-11-04 00:02:59 -05:00 
			
		
		
		
	Multi-threaded static library require -pthread to correctly link and works. The pkg-config we provide tho only works with dynamic multi-threaded library and won't provide the correct libs and cflags values if lib-mt is used. To handle this, introduce an env variable MT to permit advanced user to install and generate a correct pkg-config file for lib-mt or detect if lib-mt target is called. With MT env set on calling make install-pc, libzstd.pc.in is a pkg-config file for a multi-threaded static library. On calling make lib-mt, a libzstd.pc is generated for a multi-threaded static library as it's what asked by the user by forcing it. libzstd.pc is changed to PHONY to force regeneration of it on calling lib targets or install-pc to handle case where the same directory is used for mixed compilation. This was notice while migrating from meson to make build system where meson generates a correct .pc file while make doesn't. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
		
			
				
	
	
		
			17 lines
		
	
	
		
			479 B
		
	
	
	
		
			PkgConfig
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			479 B
		
	
	
	
		
			PkgConfig
		
	
	
	
	
	
#   ZSTD - standard compression algorithm
 | 
						|
#   Copyright (c) Meta Platforms, Inc. and affiliates.
 | 
						|
#   BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php)
 | 
						|
 | 
						|
prefix=@PREFIX@
 | 
						|
exec_prefix=@EXEC_PREFIX@
 | 
						|
includedir=@INCLUDEDIR@
 | 
						|
libdir=@LIBDIR@
 | 
						|
 | 
						|
Name: zstd
 | 
						|
Description: fast lossless compression algorithm library
 | 
						|
URL: https://facebook.github.io/zstd/
 | 
						|
Version: @VERSION@
 | 
						|
Libs: -L${libdir} -lzstd @LIBS_MT@
 | 
						|
Libs.private: @LIBS_PRIVATE@
 | 
						|
Cflags: -I${includedir} @LIBS_MT@
 |