3 Star 13 Fork 5

Gitee 极速下载 / libspng

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/randy408/libspng
克隆/下载
meson.build 2.03 KB
一键复制 编辑 原始数据 按行查看 历史
Randy 提交于 2023-05-08 16:45 . bump version to v0.7.4
project('spng', 'c',
version : '0.7.4',
license : [ 'BSD-2-Clause', 'libpng-2.0' ],
default_options : 'c_std=c99'
)
spng_args = []
static_subproject = false
if get_option('default_library') == 'static'
spng_args = '-DSPNG_STATIC'
static_subproject = meson.is_subproject()
endif
cc = meson.get_compiler('c')
if get_option('enable_opt') == false
add_project_arguments('-DSPNG_DISABLE_OPT', language : 'c')
elif cc.get_argument_syntax() == 'gcc' and host_machine.system() == 'x86'
add_project_arguments('-msse2', language : 'c')
endif
# Check for GNU target_clones attribute
if cc.links(files('tests/target_clones.c'), args : '-Werror', name : 'have target_clones')
add_project_arguments('-DSPNG_ENABLE_TARGET_CLONES', language : 'c')
endif
if get_option('use_miniz') == true
add_project_arguments('-DSPNG_USE_MINIZ', language : 'c')
zlib_dep = dependency('miniz', fallback : [ 'miniz', 'miniz_dep'])
else
zlib_dep = dependency('zlib',
required : false,
fallback : ['zlib', 'zlib_dep'],
static : get_option('static_zlib'))
if not zlib_dep.found()
zlib_dep = cc.find_library('z')
endif
endif
m_dep = cc.find_library('m', required : false)
spng_deps = [ zlib_dep, m_dep ]
spng_inc = include_directories('spng')
spng_src = files('spng/spng.c')
spng_lib = library('spng',
spng_src,
c_args : spng_args,
dependencies : spng_deps,
install : not static_subproject,
version : '0.7.4'
)
spng_dep = declare_dependency(
link_with : spng_lib,
compile_args : spng_args,
include_directories : spng_inc,
version : meson.project_version()
)
if meson.version().version_compare('>= 0.54.0')
meson.override_dependency('spng', spng_dep)
endif
subdir('examples')
subdir('tests')
if get_option('benchmarks') == true
subproject('spngt')
endif
if static_subproject
subdir_done()
endif
install_headers('spng/spng.h')
pkg = import('pkgconfig')
pkg.generate(spng_lib,
extra_cflags : spng_args,
description : 'PNG decoding and encoding library'
)
1
https://gitee.com/mirrors/libspng.git
git@gitee.com:mirrors/libspng.git
mirrors
libspng
libspng
master

搜索帮助