Add libzip wrap fallback

This commit is contained in:
Andrei Alexeyev 2019-03-17 07:06:47 +02:00
parent cc6514151a
commit 4443c3358b
No known key found for this signature in database
GPG key ID: 363707CD4C7FE8A4
3 changed files with 12 additions and 5 deletions

View file

@ -4,6 +4,10 @@ project('taisei', 'c',
meson_version : '>=0.45.0',
default_options : [
'c_std=c11',
'default_library=static',
'libzip:enable_crypto=false',
'libzip:enable_bzip2=false',
# You may want to change these for a debug build dir
'buildtype=release',
@ -105,7 +109,7 @@ dep_sdl2 = dependency('sdl2', version : '>=2.0.5', required : t
dep_sdl2_mixer = dependency('SDL2_mixer', required : false, static : static)
dep_webp = dependency('libwebp', version : '>=0.5', required : false, static : static)
dep_webpdecoder = dependency('libwebpdecoder', version : '>=0.5', required : false, static : static)
dep_zip = dependency('libzip', version : '>=1.2', required : false, static : static)
dep_zip = dependency('libzip', version : '>=1.2', required : false, static : static, fallback : ['libzip', 'libzip_dep'])
dep_zlib = dependency('zlib', required : true, static : static)
dep_crypto = dependency('libcrypto', required : false, static : static)
@ -147,10 +151,7 @@ else
endif
if enable_zip
if not dep_zip.found()
error('ZIP support enabled but libzip not found')
endif
assert(dep_zip.found(), 'ZIP support enabled but libzip not found')
taisei_deps += dep_zip
endif

View file

@ -1 +1,2 @@
crossc/
libzip/

5
subprojects/libzip.wrap Normal file
View file

@ -0,0 +1,5 @@
[wrap-git]
directory=libzip
url=https://github.com/taisei-project/libzip.git
push-url=git@github.com:taisei-project/libzip.git
revision=taisei-v1.3