Skip to content

Commit

Permalink
[build] Use subproject for zlib
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledhosny committed Sep 1, 2018
1 parent a038873 commit 1431ed2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 38 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,3 @@
path = third_party/lz4
url = https://github.com/lz4/lz4.git
ignore = dirty
[submodule "third_party/zlib"]
path = third_party/zlib
url = https://github.com/madler/zlib.git
ignore = dirty
36 changes: 4 additions & 32 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -86,40 +86,9 @@ libwoff2 = library('woff2',
)


libz = library('z',
'third_party/zlib/adler32.c',
'third_party/zlib/compress.c',
'third_party/zlib/crc32.c',
'third_party/zlib/crc32.h',
'third_party/zlib/deflate.c',
'third_party/zlib/deflate.h',
'third_party/zlib/gzclose.c',
'third_party/zlib/gzguts.h',
'third_party/zlib/gzlib.c',
'third_party/zlib/gzread.c',
'third_party/zlib/gzwrite.c',
'third_party/zlib/infback.c',
'third_party/zlib/inffast.c',
'third_party/zlib/inffast.h',
'third_party/zlib/inffixed.h',
'third_party/zlib/inflate.c',
'third_party/zlib/inflate.h',
'third_party/zlib/inftrees.c',
'third_party/zlib/inftrees.h',
'third_party/zlib/trees.c',
'third_party/zlib/trees.h',
'third_party/zlib/uncompr.c',
'third_party/zlib/zconf.h',
'third_party/zlib/zlib.h',
'third_party/zlib/zutil.c',
'third_party/zlib/zutil.h',
)


ots_includes = [
'include',
'third_party/woff2/include',
'third_party/zlib',
]

ots_sources = [
Expand Down Expand Up @@ -185,7 +154,7 @@ ots_sources = [
'src/vorg.h',
]

ots_libs = [libbrotli, libwoff2, libz]
ots_libs = [libbrotli, libwoff2]

if get_option('graphite')
ots_includes += ['third_party/lz4/lib']
Expand Down Expand Up @@ -234,10 +203,13 @@ if get_option('variations')
]
endif

zlib = dependency('zlib', fallback : ['zlib', 'zlib_dep'])

libots = library('ots',
ots_sources,
include_directories: include_directories(ots_includes),
link_with: ots_libs,
dependencies: zlib,
)


Expand Down
2 changes: 1 addition & 1 deletion subprojects/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/packagecache
/*-release*
/*-*
1 change: 0 additions & 1 deletion third_party/zlib
Submodule zlib deleted from cacf7f

0 comments on commit 1431ed2

Please sign in to comment.