Permalink
Browse files

Use "ZLIB_LIBRARY" instead of "ZLIB_LIBRARIES" as expected by FindZLIB

See #17
  • Loading branch information...
1 parent 87d8601 commit be39470b1253a822abf4c668aacd8e83d5d37b72 @jcfr jcfr committed Apr 29, 2013
Showing with 10 additions and 9 deletions.
  1. +3 −2 README
  2. +3 −3 cmake/ConfigureChecks.cmake
  3. +4 −4 cmake/extensions/CMakeLists.txt
View
5 README
@@ -111,8 +111,9 @@ CMake options:
USE_SYSTEM_ZLIB=ON|OFF (defaults to ON)
If set to OFF, no attempt to detect ZLIB libraries will be done.
Associated python extensions are: BINASCII, ZLIB
- Following CMake variables can manually be set: ZLIB_LIBRARIES, ZLIB_INCLUDE_DIR
- If [ZLIB_LIBRARIES, ZLIB_INCLUDE_DIR] are found, extensions [BINASCII] will be built with ZLIB_CRC32
+ Following CMake variables can manually be set: ZLIB_LIBRARY, ZLIB_INCLUDE_DIR, ZLIB_ROOT
+ ZLIB_ROOT should be set only if USE_SYSTEM_ZLIB is ON
+ If [ZLIB_LIBRARY, ZLIB_INCLUDE_DIR] are found, extensions [BINASCII] will be built with ZLIB_CRC32
USE_SYSTEM_DB=ON|OFF (defaults to ON)
If set to OFF, no attempt to detect DB libraries will be done.
@@ -1452,18 +1452,18 @@ endif(HAVE_SIZE_T_FORMAT)
##########################################################
-if(ZLIB_LIBRARIES)
+if(ZLIB_LIBRARY)
cmake_push_check_state()
set(CFG_HEADERS_SAVE ${CFG_HEADERS})
set(CFG_HEADERS ${CFG_HEADERS} zlib.h)
add_cond(CMAKE_REQUIRED_INCLUDES ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIR})
- add_cond(CMAKE_REQUIRED_LIBRARIES ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
+ add_cond(CMAKE_REQUIRED_LIBRARIES ZLIB_LIBRARY ${ZLIB_LIBRARY})
check_symbol_exists(inflateCopy "${CFG_HEADERS}" HAVE_ZLIB_COPY)
set(CFG_HEADERS ${CFG_HEADERS_SAVE})
cmake_pop_check_state()
-endif(ZLIB_LIBRARIES)
+endif(ZLIB_LIBRARY)
############################################
@@ -241,15 +241,15 @@ add_python_extension(_sha512 REQUIRES OPENSSL_NOT_FOUND SOURCES sha512module.c)
# Extensions that depend on other libraries
set(binascii_REQUIRES "")
set(binascii_DEFINITIONS "")
-if(ZLIB_LIBRARIES)
+if(ZLIB_LIBRARY)
list(APPEND binascii_REQUIRES ZLIB_INCLUDE_DIR)
list(APPEND binascii_DEFINITIONS USE_ZLIB_CRC32)
endif()
add_python_extension(binascii
REQUIRES ${binascii_REQUIRES}
SOURCES binascii.c
DEFINITIONS ${binascii_DEFINITIONS}
- LIBRARIES ${ZLIB_LIBRARIES}
+ LIBRARIES ${ZLIB_LIBRARY}
INCLUDEDIRS ${ZLIB_INCLUDE_DIR}
)
add_python_extension(_bsddb
@@ -338,9 +338,9 @@ add_python_extension(_tkinter
INCLUDEDIRS ${TCL_INCLUDE_PATH} ${TK_INCLUDE_PATH}
)
add_python_extension(zlib
- REQUIRES ZLIB_LIBRARIES ZLIB_INCLUDE_DIR
+ REQUIRES ZLIB_LIBRARY ZLIB_INCLUDE_DIR
SOURCES zlibmodule.c
- LIBRARIES ${ZLIB_LIBRARIES}
+ LIBRARIES ${ZLIB_LIBRARY}
INCLUDEDIRS ${ZLIB_INCLUDE_DIR}
)

0 comments on commit be39470

Please sign in to comment.