Optionally use system bzip2 library (#10932)
Add option CMAKE_USE_SYSTEM_BZIP2 and enable it automatically when CMAKE_USE_SYSTEM_LIBRARIES is on. While we're at it, remove XMLRPC from the list of system library options because we no longer provide it in source.
This commit is contained in:
parent
6327429f55
commit
6a24bdfc4e
|
@ -69,6 +69,8 @@ MACRO(CMAKE_HANDLE_SYSTEM_LIBRARIES)
|
||||||
CACHE BOOL "Use system-installed expat" FORCE)
|
CACHE BOOL "Use system-installed expat" FORCE)
|
||||||
SET(CMAKE_USE_SYSTEM_ZLIB "${CMAKE_USE_SYSTEM_LIBRARIES}"
|
SET(CMAKE_USE_SYSTEM_ZLIB "${CMAKE_USE_SYSTEM_LIBRARIES}"
|
||||||
CACHE BOOL "Use system-installed zlib" FORCE)
|
CACHE BOOL "Use system-installed zlib" FORCE)
|
||||||
|
SET(CMAKE_USE_SYSTEM_BZIP2 "${CMAKE_USE_SYSTEM_LIBRARIES}"
|
||||||
|
CACHE BOOL "Use system-installed bzip2" FORCE)
|
||||||
ENDIF(CMAKE_USE_SYSTEM_LIBRARIES_USER)
|
ENDIF(CMAKE_USE_SYSTEM_LIBRARIES_USER)
|
||||||
|
|
||||||
# Optionally use system utility libraries.
|
# Optionally use system utility libraries.
|
||||||
|
@ -78,9 +80,10 @@ MACRO(CMAKE_HANDLE_SYSTEM_LIBRARIES)
|
||||||
${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CTEST_USE_XMLRPC" ON)
|
${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CTEST_USE_XMLRPC" ON)
|
||||||
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_ZLIB "Use system-installed zlib"
|
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_ZLIB "Use system-installed zlib"
|
||||||
${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CMAKE_USE_SYSTEM_CURL" ON)
|
${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CMAKE_USE_SYSTEM_CURL" ON)
|
||||||
|
OPTION(CMAKE_USE_SYSTEM_BZIP2 "Use system-installed bzip2" OFF)
|
||||||
|
|
||||||
# Mention to the user what system libraries are being used.
|
# Mention to the user what system libraries are being used.
|
||||||
FOREACH(util CURL EXPAT XMLRPC ZLIB)
|
FOREACH(util BZIP2 CURL EXPAT ZLIB)
|
||||||
IF(CMAKE_USE_SYSTEM_${util})
|
IF(CMAKE_USE_SYSTEM_${util})
|
||||||
MESSAGE(STATUS "Using system-installed ${util}")
|
MESSAGE(STATUS "Using system-installed ${util}")
|
||||||
ENDIF(CMAKE_USE_SYSTEM_${util})
|
ENDIF(CMAKE_USE_SYSTEM_${util})
|
||||||
|
|
Loading…
Reference in New Issue