Skip to content

Commit 05492bd

Browse files
committed
update zlib options
1 parent 87e9d63 commit 05492bd

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,21 @@ endif(BUILD_FUNCTESTING)
4949

5050
include(ExternalProject)
5151

52+
53+
5254
if (ZLIBNG)
5355
message("zlib-ng enabled.")
5456
ExternalProject_Add(zlib-ng
5557
PREFIX ${PROJECT_SOURCE_DIR}/ext/zlib-ng
5658
SOURCE_DIR ${PROJECT_SOURCE_DIR}/ext/zlib-ng
5759
BUILD_IN_SOURCE 1
58-
CONFIGURE_COMMAND mkdir -p build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=${PREFIX}
59-
BUILD_COMMAND cd build && make
60+
CONFIGURE_COMMAND mkdir -p zlib-ng && cd zlib-ng && cmake .. -DZLIB_COMPAT=ON -DZLIB_ENABLE_TESTS=OFF -DCMAKE_INSTALL_PREFIX=${PREFIX}
61+
BUILD_COMMAND cd zlib-ng && make
6062
INSTALL_COMMAND ""
6163
)
6264
endif(ZLIBNG)
6365

66+
6467
if (USE_HTSLIB)
6568
message("using htslib")
6669
ExternalProject_Add(htslib

src/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ endif(NOT ZLIBNG)
3636

3737
if (ZLIBNG)
3838
add_definitions(-DSPLITCODE_USE_ZLIB_NG)
39-
include_directories(../ext/zlib-ng/build)
39+
include_directories(../ext/zlib-ng/zlib-ng)
4040
include_directories(../ext/zlib-ng)
4141
if(WIN32)
42-
target_link_libraries(splitcode ${CMAKE_CURRENT_SOURCE_DIR}/../ext/zlib-ng/build/libz-ng.lib)
42+
target_link_libraries(splitcode ${CMAKE_CURRENT_SOURCE_DIR}/../ext/zlib-ng/zlib-ng/libz.lib)
4343
else()
44-
target_link_libraries(splitcode ${CMAKE_CURRENT_SOURCE_DIR}/../ext/zlib-ng/build/libz-ng.a)
44+
target_link_libraries(splitcode ${CMAKE_CURRENT_SOURCE_DIR}/../ext/zlib-ng/zlib-ng/libz.a)
4545
endif(WIN32)
4646
endif(ZLIBNG)
4747

src/ProcessReads.h

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,24 @@
1616
#include <atomic>
1717
#include <condition_variable>
1818

19-
#include "common.h"
2019

2120
#ifdef SPLITCODE_USE_ZLIB_NG
2221
#ifndef WITH_GZFILEOP
2322
#define WITH_GZFILEOP
2423
#endif
25-
#include "zlib-ng.h"
26-
constexpr auto gzopen = zng_gzopen;
27-
constexpr auto gzclose = zng_gzclose;
28-
constexpr auto gzwrite = zng_gzwrite;
29-
constexpr auto gzdopen = zng_gzdopen;
24+
#include "zlib-ng/zlib.h"
3025
#else
3126
#include <zlib.h>
3227
#endif
3328

29+
30+
#include "common.h"
31+
3432
#ifndef KSEQ_INIT_READY
3533
#define KSEQ_INIT_READY
36-
#ifndef SPLITCODE_USE_ZLIB_NG
3734
KSEQ_INIT(gzFile, gzread)
38-
#else
39-
KSEQ_INIT(gzFile, zng_gzread)
40-
#endif
4135
#endif
42-
36+
4337
class MasterProcessor;
4438

4539
int64_t ProcessReads(MasterProcessor& MP, const ProgramOptions& opt);

0 commit comments

Comments
 (0)