nix: add support to build with GCC
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
		@@ -5,13 +5,22 @@ lib_sources = files(
 | 
			
		||||
 | 
			
		||||
subdir('cpu')
 | 
			
		||||
 | 
			
		||||
fmt = dependency('fmt', version : '>=10.1.0')
 | 
			
		||||
 | 
			
		||||
lib_cpp_args = [ ]
 | 
			
		||||
 | 
			
		||||
fmt = dependency('fmt', version : '>=10.1.0', static: true)
 | 
			
		||||
if not fmt.found()
 | 
			
		||||
  fmt = dependency('fmt', version : '>=10.1.0', static: false)
 | 
			
		||||
  lib_cpp_args += 'DFMT_HEADER_ONLY'
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
lib = library(
 | 
			
		||||
  meson.project_name(),
 | 
			
		||||
  lib_sources,
 | 
			
		||||
  dependencies: [fmt],
 | 
			
		||||
  include_directories: inc,
 | 
			
		||||
  install: true,
 | 
			
		||||
  cpp_args: lib_cpp_args
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
import('pkgconfig').generate(lib)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user