Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch '15-consider-zlib-include-dirs'

* 15-consider-zlib-include-dirs:
  Use "ZLIB_LIBRARY" instead of "ZLIB_LIBRARIES" as expected by FindZLIB
  Explicitly specify zlib include directory
  • Loading branch information...
commit bc34b62e19aacca9a8c76f22c25e02cf0c2aa07a 2 parents 60ee828 + be39470
@jcfr jcfr authored
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
- If ZLIB_LIBRARIES is 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.
View
7 cmake/ConfigureChecks.cmake
@@ -1452,17 +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_LIBRARIES ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
+ add_cond(CMAKE_REQUIRED_INCLUDES ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIR})
+ 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)
############################################
View
13 cmake/extensions/CMakeLists.txt
@@ -239,14 +239,18 @@ add_python_extension(_sha256 REQUIRES OPENSSL_NOT_FOUND SOURCES sha256module.c)
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
REQUIRES DB_INCLUDE_PATH DB_LIBRARIES
@@ -334,9 +338,10 @@ add_python_extension(_tkinter
INCLUDEDIRS ${TCL_INCLUDE_PATH} ${TK_INCLUDE_PATH}
)
add_python_extension(zlib
- REQUIRES ZLIB_LIBRARIES
+ REQUIRES ZLIB_LIBRARY ZLIB_INCLUDE_DIR
SOURCES zlibmodule.c
- LIBRARIES ${ZLIB_LIBRARIES}
+ LIBRARIES ${ZLIB_LIBRARY}
+ INCLUDEDIRS ${ZLIB_INCLUDE_DIR}
)
if(USE_LIBEDIT)
Please sign in to comment.
Something went wrong with that request. Please try again.