Skip to content

Commit

Permalink
use FindZLIB and fix syslog
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers committed Aug 26, 2022
1 parent 31e4a47 commit 030f035
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ elseif(UNIX)
endif()
endif()

if(NOT HAVE_ZLIB_H)
if(NOT ZLIB_FOUND)
list(APPEND SRCS
src/crc32/crc32.c
)
Expand Down Expand Up @@ -488,6 +488,7 @@ else()
${OPENSSL_LIBRARIES}
${Backtrace_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${ZLIB_LIBRARIES}
)
endif()

Expand Down
6 changes: 3 additions & 3 deletions cmake/re.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
find_package(Backtrace)
find_package(Threads REQUIRED)
find_package(OpenSSL)
find_package(ZLIB)

option(USE_OPENSSL "Enable OpenSSL" ${OPENSSL_FOUND})

Expand Down Expand Up @@ -38,12 +39,11 @@ if(HAVE_ARC4RANDOM)
add_definitions(-DHAVE_ARC4RANDOM)
endif()

check_include_file(zlib.h HAVE_ZLIB_H)
if(HAVE_ZLIB_H)
if(ZLIB_FOUND)
add_definitions(-DUSE_ZLIB)
endif()

check_include_file(getopt.h HAVE_SYSLOG_H)
check_include_file(syslog.h HAVE_SYSLOG_H)
if(HAVE_SYSLOG_H)
add_definitions(-DHAVE_SYSLOG)
endif()
Expand Down

0 comments on commit 030f035

Please sign in to comment.