mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
link ncman against zlib
This commit is contained in:
parent
f8b797f9db
commit
7ed70a7234
@ -96,6 +96,6 @@ steps:
|
||||
- export TERM=xterm
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release -DUSE_PANDOC=off ..
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release -DUSE_PANDOC=off -DUSE_DOCTEST=off -DUSE_DEFLATE=off ..
|
||||
- make -j2
|
||||
- ctest --output-on-failure
|
||||
|
@ -653,16 +653,14 @@ target_include_directories(ncman
|
||||
src
|
||||
"${CMAKE_REQUIRED_INCLUDES}"
|
||||
"${PROJECT_BINARY_DIR}/include"
|
||||
)
|
||||
target_include_directories(ncman
|
||||
BEFORE
|
||||
PRIVATE
|
||||
"${libdeflate_INCLUDE_DIRS}"
|
||||
"${ZLIB_INCLUDE_DIRS}"
|
||||
)
|
||||
target_link_libraries(ncman
|
||||
PRIVATE
|
||||
notcurses-core
|
||||
"${libdeflate}"
|
||||
"${ZLIB_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -78,7 +78,7 @@ map_gzipped_data(unsigned char* buf, size_t* len, unsigned char* ubuf, uint32_t
|
||||
.zfree = Z_NULL,
|
||||
.opaque = Z_NULL,
|
||||
.next_in = buf,
|
||||
.avail_in = len,
|
||||
.avail_in = *len,
|
||||
.next_out = ubuf,
|
||||
.avail_out = ulen,
|
||||
};
|
||||
@ -87,7 +87,7 @@ map_gzipped_data(unsigned char* buf, size_t* len, unsigned char* ubuf, uint32_t
|
||||
munmap(buf, *len);
|
||||
return NULL;
|
||||
}
|
||||
r = inflate(&z, Z_FLUSH);
|
||||
r = inflate(&z, Z_FINISH);
|
||||
munmap(buf, *len);
|
||||
if(r != Z_STREAM_END){
|
||||
inflateEnd(&z);
|
||||
|
Loading…
x
Reference in New Issue
Block a user